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.
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.
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.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With