开发者

Adding permissions to app manifest programmatically

开发者 https://www.devze.com 2023-01-26 02:09 出处:网络
I am trying to add permissions to my application manifest, so it can access other apps that the user install开发者_JAVA百科s at runtime. I thought the way to do this was to define a permission-tree in

I am trying to add permissions to my application manifest, so it can access other apps that the user install开发者_JAVA百科s at runtime. I thought the way to do this was to define a permission-tree in the manifest, and then use PackageManager.addPermission() to add permissions under that tree. However, I can't get this to work and the documentation I found wasn't conclusive. Could anybody show me how to do this by means of a simple example?


You don't have access to other applications only to your application and to the applications running with your application's user ID.


Impossible in a non rooted device. Security issues involved.


Only rooted devices are cable of that, due to security reasons.


I didn't think this was possible. I thought (and was thought by a lecturer, who could also be wrong) that all the permissions had to be added as the code compiles. If you can add permissions afterwards, wouldn't that allow apps to access all of my information without my permission? There would also be no point in the confirmation screen when downloading an app, as the permissions it warns you about may not all f the permissions it is going to use.

In my opinion I don't think it should be possible. It is too easily abused. I also don't think it is possible and I think you will have a hard time finding any info on it.

0

精彩评论

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