cordova-plugin-geolocation icon indicating copy to clipboard operation
cordova-plugin-geolocation copied to clipboard

Android X - Handle location permission when user selects- "Allow only when using the app"

Open meghanadixit1 opened this issue 5 years ago • 3 comments

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

meghanadixit1 avatar Feb 11 '20 14:02 meghanadixit1

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

wayne12304 avatar Mar 17 '20 08:03 wayne12304

Also seeing this issue on Android 11. When I select 'Only this time' or 'While using the app', getCurrentPosition is timing out.

rogisolorzano avatar Sep 02 '20 03:09 rogisolorzano

Any fix for this?

spinninghamster avatar Dec 07 '20 04:12 spinninghamster

Fixed by https://github.com/apache/cordova-plugin-geolocation/pull/250

breautek avatar Jun 05 '23 02:06 breautek