Google Mobile Ads - get publisher provided location

admob, android, google-play-services

Solution

As I understand, you can receive user's location using standart Android methods (https://developer.android.com/google/play-services/location.html) and set location in AdRequest using this method: https://developer.android.com/reference/com/google/android/gms/ads/AdRequest.Builder.html#setLocation(android.location.Location)

This question also may be helpful: How to supply location with an AdRequest now that AdMob has become part of the Google Play Services?

Problem

Google Mobile Ads With Google Play services 4.1, the Google Mobile Ads SDK now fully supports DoubleClick for Publishers, DoubleClick Ad Exchange, and Search Ads for Mobile Apps. You can also use a new publisher-provided location API to provide Google with the location when requesting ads. Location-based ads can improve your app monetization. How to get publisher provided location? How to set the retrived location to `com.google.android.gms.ads.AdRequest`?

Original source

Related problems