0

I am facing an issue with my android application where it keeps downloading a lot of data for users in the background fetch mode.

I do invoke the app through an alarm to send a local notif, but that is pretty much it, apart from sending the notification it does not do anything else. I have integrated couple of ad network sdks in the application which i suspect can be doing this.

Is there some way by which i can figure out why this is happening as to who is downloading the data. Android only gives an app level information .. Is there something by which i can restrict the amount of data to be downloaded on the mobile data while the app is in background ?

Any help or suggestion would be really helpful .

Punit Sharma
  • 2,951
  • 1
  • 20
  • 35
Siddhant Jain
  • 489
  • 5
  • 26

1 Answers1

0

So i could not find any such way/tool which tells how much of data a sdk is consuming. Here is the alternate way which i found to solve the issue.

To monitor data usage by the application/sdk we can create a transparent proxy at any machine and then connect the device to this proxy. As a result of this all the data that the app will consume which may be due to the sdks insside the application or because the assets which we download will be routed through this proxy which can then be monitored.

There are couple of open source proxies which are available squid, red socks which can be used to monitor the data usage from the application. But again these proxies might take more time to setup. If this is only a short time exercise one can use Charles proxy, its a paid application but gives a 30 day free trial session as well.

Here is one how to use Charles documentation http://jaanus.com/debugging-http-on-an-android-phone-or-tablet-with-charles-proxy-for-fun-and-profit/ which does a pretty good job of explaining and setting up the proxy.

Siddhant Jain
  • 489
  • 5
  • 26