动态获取Android权限 [英] get Android permission dynamically

查看:85
本文介绍了动态获取Android权限的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想知道是否可以仅使用一些代码而无需使用AndroidManifest来动态地获得Android许可,因为我有一些OSGi捆绑软件在Android上运行,并且在没有Android许可的情况下它们的功能受到限制.

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 and without Android permission they are restricted in functionality.

谢谢您的回答,是的,这会使用户体验复杂化,如果提供了这种机制,对用户也很危险

Thanks for your answers, yes it complicates the user experience and it's also dangerous for the user if that mechanism is provided

推荐答案

不可能.

您无法更改已安装的APK的内容.无论如何,允许这种行为是非常危险的,因为整个权限系统是要允许用户首先阅读应用程序需要的权限,以便他可以判断是否可以.

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.

这篇关于动态获取Android权限的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆