l am try build ionic geolocation project on Android .l used Location Accuracy plugin and Android Permissions . Every things seem working alright, but Android Permissions is not working . i click on button geolocation to get permission to turn on GPS without leaving app , i have nothing shows ! . Only one error in console is
ERROR Error: Uncaught (in promise): Object: {"code":-1,"message":"A request is already in progress"}
method location :
async location() {
this.androidper.checkPermission(this.androidper.PERMISSION.REQUEST_PRIORITY_HIGH_ACCURACY).then(
result => {
if (!result.hasPermission)
return this.locationaccuracy.request(this.locationaccuracy.REQUEST_PRIORITY_HIGH_ACCURACY).then(() => {
this.leafletMap();
this.t.dismiss('1');
}, async err => {
const a = await this.a.create({
backdropDismiss: false,
cssClass:'my-custom-class',
message:'We need permissions for GPS ',
buttons: [
{
text:'cancel',
handler:()=>{
this.presentToast()
}
},
{
text: 'Turn on GPS',
handler: () => {
this.location()
}
}
]
})
a.present()
})
else {
this.leafletMap()
}
}).catch(async (e)=>{
const a = await this.a.create({
backdropDismiss: false,
message:'We need permissions for GPS ',
cssClass:'my-custom-class',
buttons: [
{
text:'Cancel',
handler:()=>{
this.presentToast()
}
},
{
text: 'Turn on GPS ',
handler: () => {
this.location()
}
}
]
})
a.present()
})
}
Any idea please ?