質問

my app is actually using the PARSE library for push notifications, which requires some permissions to work properly. I've noticed that some of the potential users of my application are a bit suspicious in particular of the permission GET_ACCOUNTS: they think it could access their personal data or so :-/

I looked at the Android documentation (see here) and it seems that GET_ACCOUNTS is only required for push notifications for devices running OS versions below 4.0.4, so I would like to get rid of that permission at least for higher OS versions.

What it the best way to achieve this?. I imagine that I could use the Play Store Multiple APK support, but is this really necessary just for removing a single line of permissions in Manifest file?. I hope there is a better solution but so far I couldn't find out any other.

役に立ちましたか?

解決

Use android:maxSdkVersion on your <uses-permission> Manifest entry:

<uses-permission android:name="android.permission.GET_ACCOUNTS"
    android:maxSdkVersion="13" />

Note: you should still test on both Android versions as Parse may still check for an account even on higher versions of Android.

ライセンス: CC-BY-SA帰属
所属していません StackOverflow
scroll top