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.
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.
Copyright © 2021 Jogjafile Inc.
You can use android.net.TrafficStats to get traffic details:
for example to get Total bytes received:
and if you want to get send and received info of your apps one by one you can get it like this:
first get all apps running info by this:
then get UID of each app you want
let me know is this what you want