简体   繁体   English

监控HTML5 iphone / android应用程序中的网络活动?

[英]Monitoring network activity in an HTML5 iphone/android app?

I want to create an HTML5 app for iPhones and Androids that is based on an HTML5 app framework. 我想为基于HTML5应用程序框架的iPhone和Androids创建一个HTML5应用程序。 The app will do nothing but monitor the network activity (only cellular not WIFI) of the device. 该应用程序只会监控设备的网络活动(仅限蜂窝而非WIFI)。

I have been searching for how to do this for a few hours now, but haven't been able to find out how to do this, or even if it is possible or not. 我几个小时以来一直在寻找如何做到这一点,但未能找到如何做到这一点,或者即使有可能。

Is it possible to monitor iPhones/Androids network activity in an HTML5 app built on an HTML5 app framework? 是否有可能在基于HTML5应用程序框架构建的HTML5应用程序中监控iPhone / Androids网络活动? And if so, how? 如果是这样,怎么样?

(I'd prefer to find a framework that exposes the network data usage of iPhones and Androids to the app instead of coding my own if possible) (我更愿意找到一个框架,将iPhone和Androids的网络数据使用暴露给应用程序,而不是在可能的情况下编写自己的代码)

If you built the application container for your HTML5 app then yes with the new Web Inspector for Safari, this works as well if your building a mobile html5 app on a server. 如果您为HTML5应用程序构建了应用程序容器,那么使用新的Web Inspector for Safari就可以了,如果您在服务器上构建移动html5应用程序,这也可以。

Chrome also has a similar debugging feature for Android. Chrome也有类似Android的调试功能。

http://webdesign.tutsplus.com/tutorials/workflow-tutorials/quick-tip-using-web-inspector-to-debug-mobile-safari/ http://webdesign.tutsplus.com/tutorials/workflow-tutorials/quick-tip-using-web-inspector-to-debug-mobile-safari/

https://developers.google.com/chrome-developer-tools/docs/remote-debugging https://developers.google.com/chrome-developer-tools/docs/remote-debugging

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

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