flutter-geolocator icon indicating copy to clipboard operation
flutter-geolocator copied to clipboard

[ANDROID]`GeolocatorPlatform.requestPermission()` returns `deniedForever` when dismissing the dialog

Open DominicOrga opened this issue 3 years ago • 1 comments

🐛 Bug Report

When dismissing the permission dialog by pressing on the background, GeolocatorPlatform.requestPermission() erroneously returns deniedForever. However, when you fetch the location permission via GeolocatorPlatform.checkPermission(), this returns denied which is the correct location permission.

Expected behavior

Dismissing the GeolocatorPlatform.requestPermission should return the current location permission instead of deniedForever.

Reproduction steps

Step 1: Show the request permission dialog Step 2: Dismiss the dialog by tapping on the background (This returns a location permission) Step 3: Fetch the location permission

By comparing the location permissions obtained from Step 2 and Step 3, we get two different results.

Configuration

Version: 8.2.0

Platform:

  • [ ] :iphone: iOS
  • [x] :robot: Android

DominicOrga avatar Apr 27 '22 06:04 DominicOrga

@DominicOrga Thanks for reporting your issue. I am able to reproduce the issue, and I think it indeed is incorrect behaviour. I will take a look into it and will give you a heads up when the changes are published.

florissmit1 avatar May 13 '22 09:05 florissmit1

hello sir can i work on this issue ?

huzaifansari54 avatar Oct 11 '22 17:10 huzaifansari54

Hi @DominicOrga

Unfortunately the Android SDK doesn't support this. This is explained into more detail in this comment for issue #1087.

Also have a look at our Wiki page.

TimHoogstrate avatar Jun 28 '23 09:06 TimHoogstrate