NeoLSN / cordova-plugin-android-permissions

This plugin is designed for supporting Android new permissions checking mechanism.
Apache License 2.0
273 stars 178 forks source link

Problem requesting ACCESS_BACKGROUND_LOCATION #99

Open Frafilips opened 3 years ago

Frafilips commented 3 years ago

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?

NeoLSN commented 2 years ago

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

ivinantony commented 2 years ago

Its not working in ionic and android 30 above

Gioele-Bencivenga commented 2 years ago

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