Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Go to My app's App Permission screen

Is there an Intent to go to my Application's "App Permissions" screen in Android-M?

I am making my App ready for Android-M and with the new permissions model. I have followed all the steps mentioned in the link

https://developer.android.com/training/permissions/requesting.html

Everything is set and all is good accept that if the user has checked the "Never ask again" button and denied permission, on next launch I want to give the user an option to go to the Application's "App Permissions" and change the permission himself, if he ever changes his mind. I wanted to make it a bit easier for the non-tech savvy user by providing a button which would take the user straight to my application's "App Permissions" screen. Is there a way? (It would be much better than giving the user instructions like MenuSettingsApplicationsManage Applications → select application)

Thank you for helping out!

like image 831
luckylukein Avatar asked Oct 02 '15 00:10

luckylukein


People also ask

What is permission screen?

2020. Samsung has automated this process with a tool called the App Permission Monitor, which notifies you if any apps use a permission that's especially important or outside their normal operating range.

What is app permission control?

What is the Android permissions controller? The Android permissions controller is a part of the Android operating system that tells apps what they can and can't access. When you install a new app, the Android permissions controller is what gives you the option to allow or deny permissions for that app.


2 Answers

No, there is no intent to go directly to the Permissions screen.

However, just as in previous versions of Android, you can point people to your application's detail setting page using code such as:

Intent intent = new Intent(Settings.ACTION_APPLICATION_DETAILS_SETTINGS,     Uri.fromParts("package", getPackageName(), null)); intent.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK); startActivity(intent); 

This will allow them to only hit a single button (the Permissions button on that screen) before they can access permissions.

Note that as per the UX around asking for permissions, consider linking to the settings page only as a last resort and only in cases where the permission is necessary for your app to function at all - ideally, you should show a strong rationale when shouldShowRequestPermissionRationale() returns true (i.e., they've denied it once but have not hit 'never ask again') such that the second time the user sees a permission dialog they know exactly why you need that permission. This means that users hitting 'never ask again' should be considered a very strong signal that the user will not ever grant you that permission.

like image 141
ianhanniballake Avatar answered Oct 16 '22 18:10

ianhanniballake


Unfortunately this is not possible, however, as every other app does we can open the app's settings page so the user can grant the necessary permissions manually from there.

val intent = Intent( Settings.ACTION_APPLICATION_DETAILS_SETTINGS, Uri.fromParts("package", packageName, null) ) intent.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK) startActivity(intent) 
like image 20
Stephen Avatar answered Oct 16 '22 16:10

Stephen