Questions tagged [android-data-usage]

49 questions
18
votes
4 answers

How do I programmatically show data usage of all applications?

On Android 4.0 onwards we have data usage control options in the phone. Please check the attached screen shot for further understanding. http://developer.android.com/about/versions/android-4.0-highlights.html Now I have some requirement to check…
Kiran_b
  • 363
  • 1
  • 5
  • 19
14
votes
1 answer

How to measure the data usage of my app in react native?

I have a react-native app that I want to measure the data usage per user and gather them to optimize it later. I saw old questions for native android suggesting that trafficStats may give stats by UUID. What possibilities are there for…
Assem
  • 11,574
  • 5
  • 59
  • 97
12
votes
1 answer

How to check mobile data usage programmatically?

The question is pretty straight forward, How do I find out how much mobile data (in GB or MB) has the user used in the current month? As it has been reported as off topic, I want to clarify that the data usage is supposed to be checked via code in…
Daniele C
  • 171
  • 1
  • 5
10
votes
4 answers

TrafficStats Api android and calculation of daily data usage

Have a confusion over following two methods of TrafficStats of Android: getUidTxBytes(int uid) and getUidRxBytes(int uid) , These two methods return the number of bytes transmitted and received through the network for this UID. But what is the time…
Naba
  • 503
  • 2
  • 9
  • 19
10
votes
2 answers

Internet usage(Data usage) by WebView

I have used WebView for browsing in my application, now i want to get internet usage by my WebView. Is it possible in android? I have searched a lot but not getting even a single hint. Can anyone help me? I know you will ask me what have you tried…
Ravi
  • 34,851
  • 21
  • 122
  • 183
7
votes
3 answers

How to calculate mobile and wifi data usage of each application in android?

Is there any possible way for calculating mobile and wifi usage of each application in android using TrafficStats' : (getUidRxBytes,getUidTxBytes, getTotalRxbytes, getTotalTXbytes, getMobileRxBytes,getMobileTxBytes) methods ? I know there must be…
user2011302
  • 391
  • 1
  • 4
  • 22
7
votes
2 answers

How to get the mobile data usage for my app (e.g. using TrafficStats)?

(I think this is a common question but please don't mark as duplicate too quickly as I believe my answers add something new to the discussion.) The relevant API is TrafficStats, which gets its data from e.g. /proc/uid_stat/. The stats must include…
Tom
  • 17,103
  • 8
  • 67
  • 75
5
votes
3 answers

Get mobile data usage in Android 10

I'm trying to make a network usage monitor app, which shows mobile data usage history to the user. For this I'm using Usage access to get accurate data usage stats from NetworkStatsManager. But this no longer works in Android 10. I'm using…
5
votes
1 answer

Android data counter discrepancy (sum of apps < total)

I am trying to understand the cause of a data discrepancy I'm noting with only a couple of applications. In both Tidal and Apple music, if I skip through tracks while listening to them, I will immediately get a 10% to 15% data discrepancy between…
5
votes
1 answer

How to get Data usage for last 1 month in android?

I need to get data usage statistics for last month. Is there any way to calculate data usage date wise in android? I used TrafficStats class for getting data usage but it gives me all data usage of device by the given UID since device boot.
Jayesh
  • 3,661
  • 10
  • 46
  • 76
5
votes
1 answer

Android how to know Internet total data usage per day through wifi and mobile

How to know internet total data usage per day? For example, at the end of the day I used 800mb then it should return like "internet usage of 800mb on 20th May 2015". So how can I detect total data usage ? After much googling I could only find data…
Nirav Mehta
  • 1,715
  • 4
  • 23
  • 42
4
votes
0 answers

NetworkStatsManager: querySummary returns the same data for different start time

I'm trying to use NetworkStatsManager class to retrieve the data usage of my app. I want to track it once in an hour (intervals of an hour) and as I read queryDetails is not an option for me because it's just for 2-3 hours. when I tried to use…
Gal
  • 63
  • 1
  • 10
3
votes
0 answers

How to show daily total internet data usage by android programmatically?

I want to show the user how much internet data he consumed from 12am of that day till he checks, like the Datally app by google. I know that we can see the total data usage after last reboot using TrafficStats class's getTotalRxBytes and…
3
votes
1 answer

How to get total data usage of an android device programmatically?

In the settings menu on my android smartphone, I can see the total data usage of the current and past cycles. Can I somehow retrieve that information programmatically in my app? Thanks in advance.
Ginso
  • 459
  • 17
  • 33
3
votes
2 answers

How to get the stats of total mobile data used in give time period(eg, last month) by all the application in android

I'm trying to get the mobile data used by all application in previous month( or week) or between a given time period. I want to get the mobile data usage history. I see that android is doing this by default now. Is it possible to get this…
in3xes
  • 714
  • 7
  • 19
1
2 3 4