The android developer documentation says apps should respect metered vs unmetered network status: https://source.android.com/docs/core/data/data-saver and I believe iOS has a similar data usage mode system that apps should adhere to.
I’m developing an Ionic app and I want to change the timeout time on locally cached data depending on whether data saving mode is enabled or not.
Is there any platform agnostic (or even platform specific) way to detect the data saving mode of a device?
Google searches and the Ionic documentation seem to come up empty, but surely this is basic functionally that most apps have so I apologize in advance if I’m missing some obvious detail about how this is usually handled, this is my first mobile app.
Although detecting whether data saver mode is enabled still seems to be impossible as far as I can tell, the best alternative I’ve found is using the Capcitor
Network plugin which provides a way to detect what kind of connection the device has:
"wifi", "celular", "none" etc: https://capacitorjs.com/docs/v2/apis/network#networkstatus
If a future answer can provide a way to get the data saver mode state, I’ll accept that instead but for now it does not seem like it is possible.
Answered By – Matt