Ionic plugin location accuracy problem


#1

after i give user a pop whether to to turn on his gps.

how could i know if the user click ok or cancel button from the pop up
help me guys


#2

You should check again, after app resumes, whether gps is enabled or not. Something like this:

platform.resume.subscribe(() => {
       console.log("App resumed");
       this.diagnostic.isLocationEnabled().then((res) => {
         if (res == true){
           console.log("GPS enabled");
         }
         else
           console.log("GPS disabled");
         });
    })