How to control data usage limit of my application?


#1

For my application consume more data usage for single day.


#2

@manikandan can you elaborate on what you mean?


#3

Jumping the gun a little, you could measure the size of your data packets you are sending in the api requests and receiving in responses using a library like this:

It will give you the stats that can show how much data you are sending and receiving (perhaps then you could send these to Google Analytics). This is step #1 in figuring out if you need to control data usage.

       @Override
        public void onResponseSuccess(NetworkInfo info, RequestStats requestStats) {
            Log.d(MainActivity.class.getName(), "onResponseSuccessReceived : "
                    + "\nId : " + requestStats.id
                    + "\nRequest Size : " + requestStats.requestSize
                    + "\nResponse Size : " + requestStats.responseSize;
        }