如何监控并得到一个Android应用程序HTTP流量? [英] How can I monitor and get http traffic in an android application?

查看:730
本文介绍了如何监控并得到一个Android应用程序HTTP流量?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想知道有没有办法拦截/监控HTTP流量的机器人。这是我能想到的一个方法是安装在Android的浏览器源$ C ​​$ C自定义模块,这样所有的流量经过它。

I am wondering is there a way to intercept/monitor http traffic in android. One way which I could think of is to install custom module in android's browser source code such that all traffic goes through it.

请引导我到相关的选择。否则,我们如何才能实现自定义模块,任何指引?

Please steer me to the pertinent choice. Else how can we implement custom module, any guidelines?

推荐答案

如果你知道浏览器的PID,你可以使用的 getUidRxBytes()获得的 TrafficStats

If you know the browsers PID, you can use getUidRxBytes() to get TrafficStats

这篇关于如何监控并得到一个Android应用程序HTTP流量?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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