Send user to the settings page


#1

Hi people!

I am using the Geolocation service and i want to send the user to the settings page if the GPS is disabled.
Like this:

I look in stackoverflow and research in google but i didn’t find any solution, anyone solve this problem?

Thanks!!!


#2

Is this the cordova geolocation plugin?
Check out ng-cordova, where you can provide some error handling.

http://ngcordova.com/docs/#Geolocation

 $cordovaGeolocation
    .getCurrentPosition()
    .then(function (position) {
      var lat  = position.coords.latitude
      var long = position.coords.longitude
    }, function(err) {
      // error
    });

  // begin watching
  var watch = $cordovaGeolocation.watchPosition({ frequency: 1000 });
  watch.promise.then(function() { /* Not  used */ }, 
    function(err) {
      // An error occurred.
    }, 
    function(position) {
      // Active updates of the position here
      // position.coords.[ latitude / longitude]
  });


#3

Yes this is working perfectly, what i want is to show the user a popup with a Settings button and when they click it, send them to the settings page of de phone.