Which permissions should i include when i use admob android

♀尐吖头ヾ 提交于 2020-06-02 07:14:51

问题


Which permissions should i include when i use admob "android" to make it using user location to improve earning from ads? i am using these permissions and features

  <meta-data
        android:name="ADMOB_ALLOW_LOCATION_FOR_ADS"
        android:value="true" />

    <uses-permission android:name="android.permission.ACCESS_FINE_LOCATION" />
    <uses-permission android:name="android.permission.INTERNET" />
    <uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
    <uses-feature android:name="android.hardware.location.gps" />

What permission unneeded in my case? I dont want app ask user to use location when he install it and let admob using location data at the same time


回答1:


You don't need to include any special permissions to use AdMob when building an Android app. The SDK comes with its own manifest file with the appropriate permissions, and these will be included in your app's final APK automatically via manifest merging.

There's currently a bug in Android Studio that can cause a warning about permissions to appear when using the Mobile Ads SDK, but your app should still compile and run just fine. Our official sample for Native Ads Express has no permissions in its app manifest, for example, but still loads and displays ads correctly.



来源:https://stackoverflow.com/questions/45466821/which-permissions-should-i-include-when-i-use-admob-android

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