dpa99c / cordova-diagnostic-plugin

Cordova/Phonegap plugin to manage device settings
539 stars 361 forks source link

Android 11.0 - requestLocationAuthorization() returns DENIED without showing the first permission prompt #445

Closed rkkhadka90 closed 3 years ago

rkkhadka90 commented 3 years ago

Bug report

CHECKLIST

Current behavior:

In Android 11:

If I call this.diagnostic.requestLocationAuthorization(this.diagnostic.locationAuthorizationMode.ALWAYS), the response is alway denied and I do not see the permission prompt at all.

Expected behavior:

I expect to see the first location permission prompt.

call below api in your cordova project using android 11 and higher: this.diagnostic.requestLocationAuthorization(this.diagnostic.locationAuthorizationMode.ALWAYS)

Steps to reproduce:

Screenshots

Environment information

Runtime issue

Android build issue:

iOS build issue:

Related code:

insert any relevant code here such as plugin API calls / input parameters

this.diagnostic.requestLocationAuthorization(this.diagnostic.locationAuthorizationMode.ALWAYS)

Console output

console output ``` // Paste any relevant JS/native console output here ```


**Other information:**