Ionic location accuracy fetching data


#1

Hi to all good day.
I implement ionic location accuracy to identify if the user turn off the gps
then make a pop up to choose whether he wants to agree or not to turn on his gps
now my question how to fetch or to know when the user click ok or not?
here is my code

this.locationAccuracy.canRequest().then((canRequest: boolean) => {

if(canRequest) {
  this.locationAccuracy.request(this.locationAccuracy.REQUEST_PRIORITY_HIGH_ACCURACY).then(
    () => console.log('Request successful'),
    error => function(error){
      this.err = error;
      alert(JSON.stringify(error));
      alert(JSON.stringify(error.code));

    }
  );



}

});