New Google Mobile Ads SDK Adds Support for DFP, Search Ads, and Ad Exchange

Today, we’re excited to announce the launch of new Google Mobile Ads APIs as part of the Google Play services 4.1 update. The update includes:

  • Support for DoubleClick for Publishers (DFP), Search Ads for Apps, and DoubleClick Ad Exchange
  • A new location API

DoubleClick for Publishers

This release adds new DFP specific APIs to the package. For example, you can use the new APIs to request a 320x50 banner ad from DFP as follows:

PublisherAdView adView = new PublisherAdView(this);
LinearLayout layout = (LinearLayout) findViewById(;
PublisherAdRequest request = new PublisherAdRequest.Builder().build();

Check out the DFP docs for more examples on how to use the new DFP APIs. If you’re migrating from the old AdMob Android SDK to Google Play services, be sure to also consult our migration guide which summarizes implementation details for the new APIs.

Search Ads for Apps

Search Ads for Apps support has also been added in this release, with new APIs in the package. A search ads banner request in Google Play services looks like this:

SearchAdView adView = new SearchAdView(this);
adView.setAdSize(new AdSize(320, 60));
LinearLayout layout = (LinearLayout) findViewById(;
SearchAdRequest request = new SearchAdRequest.Builder()

Consult the Search Ads documentation for more information on how to customize your SearchAdRequest.

DoubleClick Ad Exchange

The latest release now supports DoubleClick Ad Exchange, which shares the same AdView and AdRequest classes with AdMob in Google Play Services:

adView = new AdView(this);
LinearLayout layout = (LinearLayout) findViewById(;
AdRequest request = new AdRequest.Builder().build();

See the Ad Exchange documentation for more information on implementing Ad Exchange with the new library.


We’ve added back the setLocation method to enable you to provide location to an ad request. Note that location should only be provided if your app already makes use of location.

Assuming you’ve grabbed location via a suitable method, you can pass the location when building an AdRequest:

Location location = … // get location.
AdRequest request = AdRequest.Builder().setLocation(location).build();

The new library can be downloaded from Android’s SDK manager. Consult the setup guide for detailed installation instructions. You can see a full list of changes on our release notes page.

Give us a shout on our forum with any questions or concerns about the release, and stay tuned on our G+ page for the latest updates (and maybe even a tips/tricks campaign!) on Google Mobile Ads APIs.