How to Set an Intent to Display the Android Device Location Settings Page

public static final String ACTION_LOCATION_SOURCE_SETTINGS was added in API level 1
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.