How do i popup a message box that tells the user to switch on their GPS settings. The popup message should also contain a button that would take the user directly to their settings. How can i do it.
Asked
Active
Viewed 68 times
0
-
What have you tried so far? This also might be a duplicate: [Show Popup when Location access is disable by user](http://stackoverflow.com/q/24160472/2932698) – Bram Apr 22 '15 at 13:57
1 Answers
0
I will leave creation of the dialog / layout / anything else which will display the prompt.
Opening localization settings:
Intent viewIntent = new Intent(Settings.ACTION_LOCATION_SOURCE_SETTINGS);
startActivity(viewIntent);
Detecting localization enabled: How to check if Location Services are enabled?

Community
- 1
- 1

Klawikowski
- 605
- 3
- 11