Reading network activity logs on Android

南笙酒味 提交于 2019-12-12 03:24:32

问题


Can we read the app intra / inter net activity log on Android programmatically without having root access? If yes, can we do so for all apps on the device?


回答1:


For your application yes, it is possible, but you need to use some layer in the HTTP requests that handles the requests and logs the information.

For example using retrofit:

setLogLevel(LogLevel.FULL).setLog(new AndroidLog("YOUR_LOG_TAG"))

For all the applications in the device you need root, or install a custom proxy, for example: http://www.charlesproxy.com/ but with charles proxy you cannot do that programmatically...



来源:https://stackoverflow.com/questions/33212444/reading-network-activity-logs-on-android

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