get Android permission dynamically

后端 未结 4 1497
长发绾君心
长发绾君心 2020-12-18 05:02

I\'m wondering if it\'s possible to get Android permission dynamically without using AndroidManifest just with some codes, because I\'ve some OSGi bundles running on Android

相关标签:
4条回答
  • 2020-12-18 05:05

    No this is not possible.

    You can't alter the contents of an already installed APK. It would be very dangerous to allow such a behavior anyway as the whole permissions system is meant to allow the user to first read what permissions an Application requires so he can judge if it is ok or not.

    0 讨论(0)
  • 2020-12-18 05:06

    No, sorry, you must request all permissions via the AndroidManifest.xml file.

    0 讨论(0)
  • 2020-12-18 05:11

    Guys now from Android 6.0 Marshmellow onward, you can ask users at runtime to allow permissions dynamically, I found of it, have a look at this link. I hope it will help you getting idea.

    0 讨论(0)
  • 2020-12-18 05:29

    Yes, i found this line in http://developer.android.com/guide/topics/security/security.html:

    Android has no mechanism for granting permissions dynamically (at run-time) because it complicates the user experience to the detriment of security.

    0 讨论(0)
提交回复
热议问题