Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to find wifi and network data usage separately by particular application in android?

recived = TrafficStats.getUidRxBytes(uid);
send = TrafficStats.getUidTxBytes(uid);

TrafficStats.getMobileRxBytes(); 
TrafficStats.getMobileTxBytes(); 

TrafficStats.getTotalRxBytes();
TrafficStats.getTotalTxBytes();

i have application id and i can get that application data usage but i cant get information in more detailed like data usage using wifi and network. i want to find both separately for all installed application in device. how can i find that.? i have already tried many things but didn't get any solution for that.

like image 286
Sagar Maiyad Avatar asked Nov 17 '13 07:11

Sagar Maiyad


People also ask

How do you see what app is using the most Wi-Fi?

Check your router statsGo to your router's app or logon page, then look for the data usage section. If your router doesn't provide that feature then you can go to GlassWire's “Things” tab with GlassWire for PC to see a list of all the devices (Internet of Things) on your network.


1 Answers

I think you should use alternative way, get traffic by UID, for example — getUidRxPackets(int uid)

Also helpful (how get UID): (How to get all apps installed on android phone)

EDIT:

can you tell me how i can determine how much data use by wifi and mobile.??

There a nice answer — android statistic 3g traffic for each APP, how? look his logic.

like image 109
artemiygrn Avatar answered Oct 11 '22 19:10

artemiygrn