开发者

Admob Location using GPS

开发者 https://www.devze.com 2023-02-16 16:51 出处:网络
I\'ve starting integrating Admob into my application tonight and on running it, now throughout my application, admob has enabled gps, in an attempt to find my position. My application occasionally req

I've starting integrating Admob into my application tonight and on running it, now throughout my application, admob has enabled gps, in an attempt to find my position. My application occasionally requires GPS location features, but most of the time its safely disabled.

I am currently calling this, bu开发者_如何学JAVAt it doesn't seem to have any allowance for which device to use for location.

AdManager.setAllowUseOfLocation(boolean)

How can I restrict AdMob to NOT use the GPS chip for its location sensing? Is this possible?

Thank you


Location provider can be set using:

LocationProvider locationProvider =  LocationManager.NETWORK_PROVIDER;

or

LocationProvider locationProvider =  LocationManager.GPS_PROVIDER;

then

locationManager.requestLocationUpdates(locationProvider, 0, 0, locationListener);

hope that helps

0

精彩评论

暂无评论...
验证码 换一张
取 消