Hip Hip Array
Hip Hip Array

Reputation: 4753

How to get list of permission for specific application?

I have an application that gets a list of all installed applications in my device and i have these populated in a spinner. I also have the application getting all the permissions for all the installed applications on the phone. But i am having a problem getting the list of permissions for a chosen application and not all the applications. How would i go about doing this?

I also have the application getting the chosen application from the spinner with a button. I just need to get the permissions from that chosen app?

Thanks

Upvotes: 0

Views: 551

Answers (1)

sstn
sstn

Reputation: 3069

I am not exactly sure what you might have tried already.

PackageManager.getPackageInfo() should give you a PackageInfo. According to the API docs, you need to supply it with the flag GET_PERMISSIONS to return permissions as well.

You should be able to read them from the returned PackageInfo then.

Upvotes: 1

Related Questions