judemanutd / AutoStarter

This library helps bring up the autostart permission manager of a phone to the user so they can add an app to autostart.
MIT License
626 stars 115 forks source link

Request: return a list of special permissions of the current device, so that we could prepare an explanation before reaching it #85

Open AndroidDeveloperLB opened 2 years ago

AndroidDeveloperLB commented 2 years ago

Currently we have isAutoStartPermissionAvailable , but this is only for the single permission of AutoStart, and even then it's for when the repository thinks it has some solution to start the Activity.

Sadly this doesn't even work in some cases, such as on Vivo devices (sample app crashed and showed it needs a permission that can't be granted: “com.vivo.permission.manage.permission.ACCESS”) .

So my request is to have a new function that will return a Set of enum values that tell us which special permissions exist on the device. This way, we could instruct users to reach the app-info screen (or settings screen of the OS) of the app, and find these special permissions to be granted.

Examples of special permissions on Xiaomi (tested on Redmi 8 on Android 10, MIUI 12.5.2) :