cordova-plugin-android-permissions icon indicating copy to clipboard operation
cordova-plugin-android-permissions copied to clipboard

Problem requesting ACCESS_BACKGROUND_LOCATION

Open Frafilips opened this issue 2 years ago • 3 comments

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?

Frafilips avatar Sep 10 '21 07:09 Frafilips

You can try request this string - 'android.permission.ACCESS_BACKGROUND_LOCATION'

NeoLSN avatar Jan 11 '22 05:01 NeoLSN

Its not working in ionic and android 30 above

ivinantony avatar May 10 '22 05:05 ivinantony

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

Gioele-Bencivenga avatar Jun 17 '22 10:06 Gioele-Bencivenga