Search code examples
google-play-servicesandroid-locationandroid-fusedlocation

How to display "To continue" instead of "For a better experience" when requesting location activation?


|-|i

To make my app able to let the user enable location, I use exception.startResolutionForResult

But my app displays "For a better experience, your device will need..."

Although I see Google Maps displays "To continue, your device will need..."

I want the "To continue" way, could someone please help me? Regards


Solution

  • Just adding setAlwaysShow(true) to LocationSettingsRequest, displays "To continue" instead of "For a better experience"

    e.g.

    val builder = LocationSettingsRequest.Builder()
        .addLocationRequest(locationRequest)
        .setAlwaysShow(true)
    

    Thanks https://stackoverflow.com/a/56420194/22157294