Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to jump to the manage permission page in Settings App with code?

The path is:

Settings -> Apps ->(In Apps list) XXX App -> Permissions.

Below is the log when I enter into the "manage permission" page manually.

08-11 02:36:02.327: I/ActivityManager(775): START u0 {act=android.intent.action.MANAGE_APP_PERMISSIONS cmp=com.android.packageinstaller/.permission.ui.ManagePermissionsActivity (has extras)} from uid 1000 on display 0

And furthermore, I searched the two key words MANAGE_APP_PERMISSIONS and ManagePermissionsActivity in the source code of the Android "M" preview1, both were not found.
Can someone can help?

like image 488
D.Feng Avatar asked Aug 12 '15 04:08

D.Feng


1 Answers

It's not possible to call startActivity() with that intent because it requires android.permission.GRANT_REVOKE_PERMISSIONS and this permission it's not avaiable for third-party apps. What you can do is to use the APPLICATION_DETAILS_SETTINGS intent.

like image 186
greywolf82 Avatar answered Oct 08 '22 13:10

greywolf82