7

aAccording to this:

https://developers.google.com/android/reference/com/google/android/gms/location/SettingsApi

You can check if location requirements are met and show a dialog if not, using startResolutionForResult().

In that dialog, you can choose "ok", "not this time" or "never".

Is it possible to disable that "never" option?

Google Maps official app has that option disabled.

Anthon
  • 69,918
  • 32
  • 186
  • 246

1 Answers1

18

Yup, so you would do it when you're building the settings request by using LocationSettingsRequest.Builder.setAlwaysShow(true). An example would look like this:

LocationSettingsRequest.Builder builder = new LocationSettingsRequest.Builder()
                .addLocationRequest(mLocationRequest)
                .setAlwaysShow(true);
Dan Getz
  • 8,774
  • 6
  • 30
  • 64
Nic Capdevila
  • 1,495
  • 14
  • 27