Releasing app that uses different permissions for different Android versions on the Google Play store?

Viewed 213

Our app is trying to follow the new Designed for Children policy, which requires not requesting location permissions: https://support.google.com/googleplay/android-developer/answer/9893335?hl=en

We require bluetooth, and request location permissions in order to connect to bluetooth. In order to not have our app removed from the play store, we are supposed to remove the location permission request and switch to CompanionDeviceManager. However, CompanionDeviceManager is only available in API 26+, and we have many users on older versions.

Is there a way for us to release a different APK for phones on 25- vs on 26+? Does the Play store have any support for this, or would we have to basically maintain 2 separate apps on the play store? I know that you can usually branch in the source code based on version, but I haven't seen that it's possible to branch on what permissions are in the manifest.

1 Answers

I'm not entirely certain how this interacts with the Designed for Children policy, but there's actually a much easier way to target permissions to specific SDK versions than creating multiple APKs: the android:maxSdkVersion property on the <uses-permission> tag. You could simply set android:maxSdkVersion="25" on the location permission, and your app should no longer ask for that permission on API 26+.

Related