How to detect data saver mode with ionic/capcitor?


The android developer documentation says apps should respect metered vs unmetered network status: 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:

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

This Answer collected from stackoverflow, is licensed under cc by-sa 2.5 , cc by-sa 3.0 and cc by-sa 4.0

Leave a Reply

(*) Required, Your email will not be published