Is there a way to check programmatically whether MobileData is enabled on Android P?
Before P, we can use getMobileDataEnabled()
with reflection like this answer.
https://stackoverflow.com/a/12864897/3752013
But after P, reflection methods throw exception... https://developer.android.com/about/versions/pie/restrictions-non-sdk-interfaces#results-of-keeping-non-sdk
Any ideas?