Adjusting Application "Permissions" realtime
I know you can apply Permissions for Applications on its manifest.xml
file. What I want to know is, can those Permissions be adjusted by the Applications on the fly?
Here's my reason: say I have an application that is allowed to do "x", "y", and "z" (SMS, sockets, etc) Permissions. Now let's say I have a logical "user" that connects to this Application, and I want that user to only be able to do "x" and "y", 开发者_Python百科but not "z" Permissions. It would be nice to have the Android Framework handle that instead of having a bunch of "if's" in the App code.
Thanks!
What I want to know is, can those Permissions be adjusted by the Applications on the fly?
No, sorry.
While it's not possible to change the Permissions that an App has, you can set your own permissions requirements on other applications connecting to yours.
See Security and Permissions in the Android Developer docs.
If your user is connecting from a separate client application, which then contacts your server application, you may be able to configure the permissions in the way you require. (I can't be certain without a bit more detail on the design that you are trying to implement).
精彩评论