[Y ] I confirm this is a suspected bug or issue that will affect other users
[Y ] I have reproduced the issue using the example project or provided the necessary information to reproduce the issue.
[Y ] I have read the documentation thoroughly and it does not help solve my issue.
[Y ] I have checked that no similar issues (open or closed) already exist.
Current behavior:
When we request for “Always” location permission, it won’t open the dialog that asks for permission and instead just returns a denied_always in the success handler i.e when we call cordova.plugins.diagnostic.requestLocationAuthorization(..,.., cordova.plugins.diagnostic.locationAuthorizationMode.ALWAYS)
When we ask for “When In Use” location permission, the dialog comes up but the location pings will not come when app is in background. So user will need to go and set the “Always” permission manually from settings.
We are able to reproduce this issue on the sample also: https://github.com/dpa99c/cordova-diagnostic-plugin-example.
We hit this issue after upgrading to Android API level 30 and cordova-android 10.1.1. We upgraded to latest diagnostic plugin version 6.1.0 and the issue is still reproducible.
Expected behavior:
We expect the location permission dialog to come up so user can grant location 'ALWAYS' permission.
Steps to reproduce:
Launch cordova-diagnostic-plugin-example and click on "Request Location Authorization Always".
Screenshots
Environment information
Cordova CLI version
cordova -v
10.0.0
Cordova platform version
cordova platform ls
android 10.1.1
Plugins & versions installed in project (including this plugin)
Bug report
CHECKLIST
[Y ] I have read the issue reporting guidelines
[Y ] I confirm this is a suspected bug or issue that will affect other users
[Y ] I have reproduced the issue using the example project or provided the necessary information to reproduce the issue.
[Y ] I have read the documentation thoroughly and it does not help solve my issue.
[Y ] I have checked that no similar issues (open or closed) already exist.
Current behavior:
When we request for “Always” location permission, it won’t open the dialog that asks for permission and instead just returns a denied_always in the success handler i.e when we call cordova.plugins.diagnostic.requestLocationAuthorization(..,.., cordova.plugins.diagnostic.locationAuthorizationMode.ALWAYS) When we ask for “When In Use” location permission, the dialog comes up but the location pings will not come when app is in background. So user will need to go and set the “Always” permission manually from settings. We are able to reproduce this issue on the sample also: https://github.com/dpa99c/cordova-diagnostic-plugin-example. We hit this issue after upgrading to Android API level 30 and cordova-android 10.1.1. We upgraded to latest diagnostic plugin version 6.1.0 and the issue is still reproducible.
Expected behavior:
We expect the location permission dialog to come up so user can grant location 'ALWAYS' permission. Steps to reproduce:
Launch cordova-diagnostic-plugin-example and click on "Request Location Authorization Always". Screenshots
Environment information
Cordova CLI version
cordova -v
Cordova platform version
cordova platform ls
Plugins & versions installed in project (including this plugin)
cordova plugin ls
cordova-plugin-androidx-adapter 1.1.3 "cordova-plugin-androidx-adapter" cordova-plugin-androidx 1.0.2 "cordova-plugin-androidx" cordova-plugin-device 2.0.3 "Device" cordova-plugin-file 6.0.2 "File" cordova-plugin-geolocation 4.1.0 "Geolocation" cordova.plugins.diagnostic 6.1.0 "Diagnostic"Dev machine OS and version, e.g.
mac OS Big Sur 11.6.1
sw_vers
winver
Runtime issue
Android build issue:
node -v
ls platforms/android/.gradle
android:targetSdkVersion
inAndroidManifest.xml
sdkmanager --list | sed -e '/Available Packages/q'
iOS build issue:
node -v
Related code:
cordova.plugins.diagnostic.requestLocationAuthorization(..,.., cordova.plugins.diagnostic.locationAuthorizationMode.ALWAYS) Console output
console output
``` // Paste any relevant JS/native console output here ```**Other information:**