Prompt Location dialog


#1

Hi,

If the device’s location service is disabled, is it possible to prompt a dialog to enable it whenever the app wants to access it ?
Something like this:

Thanks


#2

Anyone ? Even asking to open the settings would be a start.


#3

Check to make sure you have the cordova-compat plugin installed.

ionic plugin add cordova-plugin-compat --save

This will handle runtime permission checks and prompt the user to allow them


#4

I do: cordova-plugin-compat 1.1.0 "Compat" yet no dialog appears. Should I add anything to my code ?


#5

Hmmm, are you turning off the permission for the app or the whole device?


#6

Hi,
Do you mean on my device’s app manager ? Permssions are on there.
Or is there a permission to add to the code ?


#7

i use the diagnostic plugin for this, works great:


#8

Works fine eventhough it opens the settings and does not simply prompt a dialog.
But will do for now, thank you!


#9

You can use cordova-plugin-request-location-accuracy plugin to display the native location dialog without needing to switch to settings (as noted in the documentation for switchToLocationSettings())


#10

Guess I didn’t dig enough. Works fine, thanks you.


#11

54%20AM how to implment this type of prompt in ionic3


#12

Even I am looking for the same…


#13

Hi @Jhapriti09

Did you get change to achieve this think? , I need same three option in location prompt, If yes please let me know.
Thank you.