简体   繁体   English

如何在Android中限制SDK的权限?

[英]How to limit permission of SDK in android?

I want to use a library in my project? 我想在项目中使用图书馆吗? But I do not want this lib to have permission to access files, database or download something from network in my app. 但是我不希望这个库具有访问文件,数据库或从我的应用程序中的网络下载内容的权限。 How can I achieve my aim ? 我如何实现我的目标?

The library is provide by others, I need use some function in it, but i do not want it has permission to hack my app. 该库是由其他人提供的,我需要在其中使用某些功能,但我不希望它具有入侵我的应用程序的权限。 Maybe i need something like sandbox to run this lib, but I do not know how to achieve this? 也许我需要沙盒之类的东西来运行此库,但我不知道该如何实现?

In your library projects, you can remove the permissions from manifest. 在您的库项目中,您可以从清单中删除权限。 In terms of jar lib, there is no problem. 就jar lib而言,没有问题。 Because jar libraries are going to use the app permissions only. 因为jar库将仅使用应用程序权限。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM