Reputation: 86
Is there any way in Android M/N to hide the permission popup . I completely understands that Android M onwards it has a new security modal and it mandates run time permissions check for dangerous permissions. But I did not find anything related to hide/suppress the popup.
After reading the material on developer documentation(link below) I found that only normal permission can be pre granted by System without asking from user. But for others e.g. Camera, Network, Media files etc. we MUST get permission from user which I'm trying to avoid for better user experience.
https://developer.android.com/guide/topics/security/permissions.html#normal-dangerous
All I'm trying to understand that is there any way to create an app with higher privilege or make modification in AOSP or anything we can do to suppress the permission popup in Android M or N?
Any help would be appreciated. Thanks!
Upvotes: 0
Views: 620
Reputation: 11175
Only with root permissions.
Runtime.getRuntime().exec("su -c \"pm grant com.example.app android.permission.ACCESS_FINE_LOCATION\"");
Upvotes: 1