Activity Action: Show settings to allow configuration of current location sources.
In some cases, a matching Activity may not exist, so ensure you safeguard against this.
1. In the MainActivity.java file, in the onCreate method, Create New Empty Intent object
named myIntent.
2. Add the below line. This will open the Location Setting page on the Android Device.
myIntent = new Intent(android.provider.Settings.ACTION_LOCATION_SOURCE_SETTINGS);
3. Compile and run!
Next Recommended Article: How to Start an Activity
Resources:
http://developer.android.com/reference/android/provider/Settings.html#ACTION_LOCATION_SOURCE_SETTINGS
http://stackoverflow.com/questions/843675/how-do-i-find-out-if-the-gps-of-an-android-device-is-enabled