Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to find what is consuming mobile data transfer (MB) in my Android app?

I'm developing an application that needs a service to syncronize data beetween Android and a web service PHP. In the same app I have a ArcGIS Android map. I'm not able to find what is totally consuming my monthly traffic data in the background (as I can see in settings/data usage / my app background data -> growing every 2 minutes). I also tryed with wireless and I saw the same issue.

I need something to look at what is going on in the background (URL, transferred packet, ecc). I use Eclipse, Linux and real Android device...

like image 723
wildnove Avatar asked Jan 21 '26 22:01

wildnove


1 Answers

I need something to look at what is going on in the background (URL, transferred packet, ecc).

You are welcome to set up some sort of proxy server (e.g., Fiddle) and try to get your app (and ArcGIS) to use that proxy server.

You can also use TrafficStats and methods like setThreadStatsTag() and tagSocket() to apply tags to your network I/O. The Network Monitor tool in DDMS will show you traffic by tag. With savvy use of tags, you can try to narrow things down for your own code -- untagged I/O is probably from third-party code, like ArcGIS.

like image 124
CommonsWare Avatar answered Jan 24 '26 15:01

CommonsWare