I would like to track a systems cellular data usage.
I found some interesting resources. The code in the accepted answer works fine and I'm able to read the bytes downloaded over the cellular network.
But I also found out that the data is reset when the user reboots their device. So, when the user opens up the app, I might (for example) read 200 MB data usage. The app saves this value. If the user closes their app, downloads another 100 MB and then reboots the device, when the app is opened again the counter will read 0 MB. The last saved value is 200 MB. How can I find out that he actually downloaded a total of 300 MB?