开发者

How to get list of permission for specific application?

开发者 https://www.devze.com 2023-02-22 04:43 出处:网络
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

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开发者_Go百科?

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


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.

0

精彩评论

暂无评论...
验证码 换一张
取 消