Reputation: 4065
Android M is soon here, with the new permission API. I bet there are lot's of developers out there not in control of their permissions, trying to figure out what is being used where. At least that's the case for a few of my apps.
Are there any good way of getting the overview over what permission is being used where? Either an overview over what API is using what permission, or something else.
My method so far have been
a) trying to identify which API uses the permission, and locate it. In addition to my own memory and the apps features b) remove permission and see what breaks
Upvotes: 6
Views: 374
Reputation: 1204
Android Studio (latest version, latest SDK) does a pretty good job of warning you to check for permissions where needed, so it is not so difficult to find out where to add checks if permissions were granted.
Upvotes: 3
Reputation: 54781
Even if you could get an overview automatically, you actually need to know where in your code you need to request permissions.
Luckily it's not a massive list and you should be able to identify permissions you are likely to need to request.
Finding where to request will be down to your listed techniques of memory, searching and also seeing what's been forgotten and what breaks, AKA testing. Maybe in future there will be lint warnings about non-tested permissions.
The list of permission groups and permissions are here in Table 1
:
https://developer.android.com/preview/features/runtime-permissions.html
There are only 9 permission groups. Other permissions remain normal and do not need to be tested.
android.permission-group.CALENDAR
android.permission-group.CAMERA
android.permission-group.CONTACTS
android.permission-group.LOCATION
android.permission-group.MICROPHONE
android.permission-group.PHONE
android.permission-group.SENSORS
android.permission-group.SMS
android.permission-group.STORAGE
Upvotes: 2