Google Play is flagging the GET_TASKS permission as an error in the pre-launch report when supporting Android 4.4 and below
See original GitHub issueHi there! Thanks for this library, it’s helped a lot.
We had to add the GET_TASKS permission as it’s required to use the getRunningTasks()
for Android 4.4 and below else it crashes. I don’t think there’s a way to add the permission for only devices running Android 4.4 and below. https://github.com/livefront/bridge/blob/e0c4e6551ba93e877adcf58737168089f0c6c821/bridge/src/main/java/com/livefront/bridge/BridgeDelegate.java#L167
We’re about to publish a release but the Google Play pre-launch report but it’s flagged an error.
Your app is requesting permissions which are used by less than 1% of functionally similar apps:
android.permission.GET_TASKS Users prefer apps that request fewer permissions and requesting unnecessary permissions can affect your app’s visibility on the Play Store. If these permissions aren’t necessary, you may be able to use alternative methods in your app and request fewer permissions. If they are, we recommend providing an explanation to users of why you need the permissions.
Note: This guidance is based on a comparison with functionally similar apps, which change over time as new apps get published and existing apps change behavior. Therefore the warning may change even if you don’t change your permission usage.
We can explain the reason behind this but it could be a privacy concern for our users.
- What’s the GET_TASKS permission for?
- Is the GET_TASKS permission necessary?
- Is there another way we can do it so to remove the permission?
Issue Analytics
- State:
- Created 3 years ago
- Comments:5 (3 by maintainers)
Top GitHub Comments
Hi @Kisty . So this all relates to how
Bridge
actively clears data on fresh loads of an app. Due to some edge cases, determining a “fresh state” is a bit more complicated than originally intended and we now need to check for running app process data to see if there is only oneActivity
associated with you app when the check is made. The call toactivityManager.getRunningTasks(1)
is necessary to do so pre-M.I agree that it’s unfortunate that you seem to be required to add
GET_TASKS
to support Android 4.4 and below. I was not aware of that when the PR for that change was merged unfortunately as it is not part of the official documentation. At minimum I would have added a warning to the README, which I will likely do soon now.The only way I can think of getting around the requirement for most of your users would be to:
Bridge
for users 4.4-and-under and call straight to yourSavedStateHandler
instead. This should work just fine because the crash thatBridge
solves wasn’t introduced until Android Nougat anyway.Let me know if that helps.
Sure thing 👍 Glad we came up with something acceptable to get around the problem.