Android X - Handle location permission when user selects- "Allow only when using the app"
Bug Report
Problem
What is expected to happen?
Prior to Android X, when getCurrentPosition() is called, And user clicks on Allow, we used to get the current location. Now with Android X, we get new dialog with 3 options - Allow Allow only when using the app Deny
When the second option is selected, and the location is off from the device settings, Nothing happens - neither error nor success.
What does actually happen?
We should get appropriate response from the method, so that we can handle the error gracefully.
Information
Command or Code
Environment, Platform, Device
Version information
Checklist
- [ ] I searched for existing GitHub issues
- [ ] I updated all Cordova tooling to most recent version
- [ ] I included all the necessary information above
With Android11, we get a dialog with 3 options - Only this time While using the app Deny
When user select [Only this time] or [While using the app], getCurrentPosition() callback error with timeout
Also seeing this issue on Android 11. When I select 'Only this time' or 'While using the app', getCurrentPosition is timing out.
Any fix for this?
Fixed by https://github.com/apache/cordova-plugin-geolocation/pull/250