Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Android background downloads statistic

In the Android environment, each application's data usage is tracked, both in the foreground and background. Programmatically, what represents foreground and background data usage?

Does Android track this statistic based on if your application's Activity is showing on the screen (IE: between onCreate/onResume and onPause methods) and a thread is running within that time period? Or does it track if the data is downloaded from a thread the the priority THREAD_PRORITY_BACKGROUND? Or is there another state it uses?

like image 394
John Ericksen Avatar asked Aug 27 '14 18:08

John Ericksen


People also ask

What is background activity on Android?

Definition of background work. An app is running in the background when both the following conditions are satisfied: None of the app's activities are currently visible to the user. The app isn't running any foreground services that started while an activity from the app was visible to the user.

How do I know what apps are running in the background Android?

To open Quick Settings, from the top of the screen, swipe down twice. To see the number of active apps running in the background: At the bottom left, tap # active apps. Or, at the bottom right, tap the number next to Settings and Power .


1 Answers

After doing some research, read some articles, went through some website of application providers of "Monitoring Data Usage In Android" this is what I think-

Application Foreground Download Stats - Application is currently displaying on the screen, may be the user is interacting with it or just switched to another application but not exited the application or removed from recent application list. But such appications are also pushed into background by android OS after some time.

Application Background Download Stats - Application that is not currently displaying on the screen,may be the application checks for ACCESS_NETWORK_STATE and starts some of its background activity when internet is connected (like Google Play Store Automatic Application Updates), background syncing, may be the application is a service which receives data from some server, like Whatsapp, Facebook, Email application which has frequent data download from the server grabbing some notification/update.

http://www.talkandroid.com/guides/beginner/best-android-apps-for-monitoring-data-usage-june-2013/ http://www.howtogeek.com/140261/how-to-minimize-your-android-data-usage-and-avoid-overage-charges/ http://www.pcadvisor.co.uk/how-to/google-android/3443819/set-data-usage-limit-on-android/ http://www.digitaltrends.com/mobile/how-to-reduce-your-data-usage/

http://lifehacker.com/5916784/the-best-data-usage-tracker-for-android

and many more...

finally I took my own android cellphone, went through each applications data usage, Applications like Android OS, Google Services, Google Text-To-Speech had 0bytes of foreground data and MB's of background data which seems logical. Whereas, application like Opera Mini (in my case) had MB's of foreground data and like 100kb of Background data. I always use "Exit" to exit opera mini browser. My Email Application had very less Foreground data usage as compared to Background usage.(as the email application syncs in the background every 30 minutes and I rarely download any email attachment on my cellphone)

like image 105
Sagar Pilkhwal Avatar answered Oct 19 '22 13:10

Sagar Pilkhwal