1

I was able to catch if the GPS is disabled using Geolocation Plugin of Phonegap 3.6.3. Is there a way how to display this image below? Or is it customized dialog?

https://i.stack.imgur.com/bDIgF.png

Also, on other apps, once the Settings button is clicked, they are redirected to this page.

enter image description here

Can anyone here help me how to achieve this? I was searching for resources but I cant find anything that will help me.

decodingpanda
  • 594
  • 9
  • 18
  • http://stackoverflow.com/a/25773728/646998 – Christopher Oct 28 '14 at 08:45
  • @Christopher i tried earlier to copy the code but nothing happened. I think the code is in xcode build or it can be run in phonegap? – decodingpanda Oct 28 '14 at 08:50
  • You can display an alert but you can no longer have a button to launch the settings. That ability was removed in iOS 6 – Paulw11 Oct 28 '14 at 10:04
  • @Paulw11 So if this is the case, how could Facebook or Tinder and other ios apps that uses geolocation do this? – decodingpanda Oct 29 '14 at 01:07
  • That dialog is shown automatically by iOS when your app tries to access location services but it is turned off. – Paulw11 Oct 29 '14 at 01:20
  • The value of this key `NSLocationAlwaysUsageDescription` should be a string, not an array - it is the message that gets displayed in the alert. iOS will only display this alert the first time an app requests access while location services are off - if the user presses cancel they are never prompted again for that app. Try deleting and re-installing your app – Paulw11 Oct 29 '14 at 01:51
  • Let us [continue this discussion in chat](http://chat.stackoverflow.com/rooms/63824/discussion-between-zynder-and-paulw11). – decodingpanda Oct 29 '14 at 02:34

0 Answers0