Network traffic monitoring per android application

家住魔仙堡 提交于 2019-12-04 09:53:56

Well you surely can. A very simple way is to use the TrafficStats class. It can manage per app (more formally, per UID) But the problem is, it can return UNSUPPORTED. When this happens, I don't think you will have some easy (i.e. using the high level Java language) method to get the network traffic data you need.

Not sure if it can be implemented in Java as I imagine you need to access some low-level Operating system functions which are just not available in Java (but don't quote me on this!).

The obvious way I see of doing this is through C language and the Android Native Development Kit.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!