简体   繁体   English

限制在Android上访问互联网的应用程序

[英]Restricting applications that access the internet on android

Is there a way(with android code) to select which application can access the internet or uses 3G Data connection without rooting the device? 有没有一种方法(使用android代码)来选择哪个应用程序可以访问互联网或使用3G数据连接而无需植根设备? I have researched on this for months now and nothing tangible seems to be coming up. 我已经对此进行了几个月的研究,似乎没有任何实质性进展。 This is a final year project and I need to come up with an acceptable solution. 这是最后一年的项目,我需要提出一个可以接受的解决方案。

if(manager.getNetworkInfo(ConnectivityManager.TYPE_WIFI).isConnected())应用程序尝试访问wifi时使用此if(manager.getNetworkInfo(ConnectivityManager.TYPE_WIFI).isConnected())这是一个有用的条件, else if (manager.getNetworkInfo(ConnectivityManager.TYPE_MOBILE).isConnected()) useful when application trying to access 3g当应用程序尝试访问wifi时使用else if (manager.getNetworkInfo(ConnectivityManager.TYPE_MOBILE).isConnected()) useful when application trying to access 3g

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

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