What are the permissions AdMob requires in android

£可爱£侵袭症+ 提交于 2019-12-10 14:49:34

问题


On Google’s site they only mention two of them:

<uses-permission android:name="android.permission.INTERNET"/>
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE"/>

Nothing about location? Is it ok?

I noticed on forums that people also use other permissions, like:

<meta-data android:value="true" android:name="ADMOB_ALLOW_LOCATION_FOR_ADS" />
<uses-permission android:name="android.permission.ACCESS_FINE_LOCATION" />     
<uses-permission android:name="android.permission.ACCESS_MOCK_LOCATION" /> 

Is it ok to use only those two first, or shall I extend my list to location (anything else?) in order to serve better profiled ads?


回答1:


If you enable these permissions then this allows admob to geo-target your ads.

Of course, the only reason to declare:

<uses-permission android:name="android.permission.ACCESS_MOCK_LOCATION" /> 

is because you want to try out different locations during development. You don't need this permission when your app is released.




回答2:


   <uses-permission android:name="android.permission.ACCESS_COARSE_LOCATION" />

this way you will get ads from the area(country) where the device is located




回答3:


it may help someone

You should never request location permissions from users for the sole purpose of advertising.

https://support.google.com/admob/answer/6373176?hl=en



来源:https://stackoverflow.com/questions/14752769/what-are-the-permissions-admob-requires-in-android

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!