in Setting > Location,
How can I know check status of 'WiFi & mobile network location'?
Click on this, show up 'Location consent' dialog.
in Setting > Location,
How can I know check status of 'WiFi & mobile network location'?
Click on this, show up 'Location consent' dialog.
You can use the WifiManager class to get the state of Wi-Fi.
Check android.provider.Settings for a series of Intent actions you can use to launch various settings screens (such as ACTION_WIFI_SETTINGS
)
So for WIFI-Settings
you just have to add the following line
startActivity(new Intent(Settings.ACTION_WIFI_SETTINGS));
For GPS
there is a detailed explanation on this link