Open Frafilips opened 3 years ago
You can try request this string - 'android.permission.ACCESS_BACKGROUND_LOCATION'
Its not working in ionic and android 30 above
happening the same to me, code snippet:
this.androidPermission.requestPermission(this.androidPermission.PERMISSION.ACCESS_FINE_LOCATION)
.then(
res => {
this.toastService.showToast('perm ful: ' + res.hasPermission);
},
err => {
this.toastService.showToast('perm err: ' + err);
}
);
the ionic app doesn't show any prompt to the user.
the toast's text reads "perm ful: false" so it enters the success callback but the permission hasn't been granted
i'm trying with Ionic 6 and capacitor to ask the permission for ACCESS_BACKGROUND_LOCATION, but nothing is happening when i call androidPermission.requestPermission(androidPermission.PERMISSION.ACCESS_BACKGROUND_LOCATION). Instead if i request other permission all works properly. What i can do?