My program tries to detect whether a mobile network is available at a certain location.
The issue is that when I don't have a data connection it doesn't mean the network is not there... it depends on the user preferences.
There are APIs available for NetworkInfo.isAvailable()
, and for user settings such as whether user is roaming and roaming is enabled or whether AirplaneMode is on.
My problem is that I can't figure out whether the user has data services disabled under Settings/WirelessNetworks/MobileNetworks.
Sounds like a trivial problem but I haven't found an API call.