开发者

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开发者_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

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜