I would like to know if the mobile network is on or off.
My application is designed to help the user when he receives a phone call, and for this I need Internet access. Thus, I would like to display an information window when the user first accesses the application if Wi-Fi has a sleep policy and the mobile network is disconnected. (I need internet for milliseconds after the phone rings).
I found Settings.System.WIFI_SLEEP_POLICY, but I can not find any information on how to check if the mobile network is disconnected (when Wi-Fi is turned on and working).
Any help would be appreciated!
Edit: The problem is that I want to know if the mobile network is turned on by the user (while the phone could have access to WiFi at that time).
source
share