You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hello guys, I'm tring to manage location permissions on my PhoneGap app using this plugin.
The problem is that I don't understand why error is being fired.
First, when I'm opening my app after my first install, requestPermission is being called so the grant location permission popup opens on the screen, the problem is that after some ms, the error callback is fired by the requestPermission and I don't know understand why error (and why there's no error message) should be fired before even denying nor granting the permission.
I've also tried to do what this guy suggested in #84 but didn't work.
error.error is 'Unknown error.'
This is what I'm doing:
functionnoPermissionGranted(){alert('This app requires your location to be used');navigator.app.exitApp();}document.addEventListener('deviceready',e=>{cordova.plugins.permissions.checkPermission(cordova.plugins.permissions.ACCESS_FINE_LOCATION,checkStatus=>{if(!checkStatus.hasPermission){cordova.plugins.permissions.requestPermission(cordova.plugins.permissions.ACCESS_FINE_LOCATION,requestStatus=>{console.log('hasPermission: '+requestStatus.hasPermission);if(!requestStatus.hasPermission){noPermissionGranted();}else{replace('/');}},(error)=>{console.log(error.error);console.log(error.message);noPermissionGranted();});}});});
Hello guys, I'm tring to manage location permissions on my PhoneGap app using this plugin.
The problem is that I don't understand why error is being fired.
First, when I'm opening my app after my first install, requestPermission is being called so the grant location permission popup opens on the screen, the problem is that after some ms, the error callback is fired by the requestPermission and I don't know understand why error (and why there's no error message) should be fired before even denying nor granting the permission.
I've also tried to do what this guy suggested in #84 but didn't work.
error.error
is'Unknown error.'
This is what I'm doing:
And this is my
config.xml
android:The text was updated successfully, but these errors were encountered: