HaxeExtension / extension-admob

OpenFL extension for "Google AdMob" on iOS and Android.
Other
59 stars 24 forks source link

android.permission.READ_PHONE_STATE #29

Closed ramsestom closed 2 years ago

ramsestom commented 7 years ago

Just saw this extension is adding android.permission.READ_PHONE_STATE to the AndroidManifest.xml file. Is it really necessary as, as a result, the generated apk needs a Privacy Policy URL to be published on the playstore...?
I thought admob only needs android.permission.INTERNET permission to works. So do you know why you also add the android.permission.READ_PHONE_STATE permission? Did you experience any issue without it?

EDIT: looks like this permission is added because: reason: com.admobex has a targetSdkVersion < 4

I set <android target-sdk-version="23" if="android" /> in my project.xml file, as stated in the readme. So how can I have com.admobex with targetSdkVersion>=4, so that this lib do not add android.permission.READ_PHONE_STATE to my final AndroidManifest.xml file?

ramsestom commented 7 years ago

OK. I found the solution. In dependencies/admobex/AndroidManifest.xml, you need to add:

<uses-sdk android:minSdkVersion="4" /> inside the manifest tag.

The same apply to your libs using google play games (like extension-googleplaygames).

I think it would be worth to add this line to the AndroidManifest.xml of each of your libs as I doubt any one want to use them in android < 1.6 anyway (SdKVersion 4 = android 1.6)

pozirk commented 7 years ago

Huh, got the same problem by extension adding the following permissions: `

`

And I don't want them in my app, so thank you @ramsestom for posting this solution! I think the same problem with extension-facebookads.

pozirk commented 2 years ago

Should be fixed with new update.