Android Question Requesting App-Traffic (Mobile/WiFi) and Power-Consumption?

manuel-r

Member
Licensed User
Longtime User
Hi @All
Can anybody explain me how to request the data about app-traffic (WiFi and mobile) and the power comsumption? Is there any library to do this? The OS nows this data (see screenshots) so it should be possible to request it.

Android App Traffic WLAN.PNG Android App Traffic MOBILE.PNG Android Akku.PNG
 

DonManfred

Expert
Licensed User
Longtime User
Upvote 0

Erel

B4X founder
Staff member
Licensed User
Longtime User
Upvote 0

manuel-r

Member
Licensed User
Longtime User
Thank for the link.
I think I have to use "getUidRxBytes" and "getUidTxBytes". But: How do I get the UIDs for all installed packages by PackageName?

If I do it this way I have to write the complete logic for counting WiFi- and Mobile-Traffic per App. If I'm right the OS resets the counters at each reboot. So I have to request the stats each second or minute with a service.

Isn't it possible to ask the os-integrated stats as show in the screenshot in first post?
 
Upvote 0
Top