Hello Martin!
I write to ask a question.
I've already built a flow to monitor and show in notification my mobile data usage but, having shifted to an operator that resets his plan every month on the same day, I'd like to build a simpler flow.
For the one I use now, I use Init network traffic variable. My question is: considering that android 6 already keeps track of the mobile data used on a month cycle and show the number that I want (see the attached picture), is there a way to initialize "that" number? It's already calculated and it would not be necessary to do all the maths to update the network value and all the other stuff to get the used data.
Thanks for helping,
Luca
Mobile data usage
Moderator: Martin
-
- Posts: 10
- Joined: 19 Feb 2017 12:20
Mobile data usage
- Attachments
-
- 20181021_152420.png (310.99 KiB) Viewed 7339 times
Re: Mobile data usage
Hi,
Action Init Variable Network Statistics queries the data recorded by the system and should work on Android 6+.
Regards,
Martin
Action Init Variable Network Statistics queries the data recorded by the system and should work on Android 6+.
Regards,
Martin
Re: Mobile data usage
AFAIK, there is no way to clear/reset that data usage statistic using standard API. You have to use root and delete the /data/system/netstats to reset it. Be careful, deleting wrong files can cause havoc to your phone. So make sure you know the risk you are facing.
Better just make you own calculation at the beginning of the new period. You can store the starting point of the statitic to a glovar or text file.
Better just make you own calculation at the beginning of the new period. You can store the starting point of the statitic to a glovar or text file.
Index of Automagic useful thread List of my other useful posts (and others')
Xiaomi Redmi Note 5 (whyred), AOSP Extended v6.7 build 20200310 Official, Android Pie 9.0, Rooted.
Xiaomi Redmi Note 5 (whyred), AOSP Extended v6.7 build 20200310 Official, Android Pie 9.0, Rooted.