Flutter-geolocator: Geolocator.checkPermission() doesn't return LocationPermission.deniedForever

Created on 31 Oct 2020  路  2Comments  路  Source: Baseflow/flutter-geolocator

馃悰 Bug Report

I'm finding that Geolocator.checkPermission() never returns LocationPermission.deniedForever when I would expect it to. I'm able to reproduce this behaviour in the sample app, on API 29 and 30.

Expected behavior

After tapping "Deny & don't ask again" (API 29) or tapping "Deny" twice (API 30) Geolocator.checkPermission() should return LocationPermission.deniedForever.

Reproduction steps

  • Run the sample app.
  • Tap "Deny" when location permissions are requested.
  • Visit the position updates screen, and tap the "Request permission" button.
  • Tap "Deny & don't ask again" (API 29) or "Deny" (API 30).

Result

The message on the screen doesn't update to reflect that permission is permanently denied.

Tapping the "Request permission" button again doesn't load the permission dialog.

Configuration

Version: 6.1.3
Platform:

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

Most helpful comment

That's awesome, thank you for taking the time to track it down, @mvanbeusekom! I've just tested it, and it works perfectly. 馃檪

All 2 comments

Hi @pento, thank you very much for reporting this issue. It took me a bit to find time to analyze the problem but I found it.

Today I released version 6.1.5 of the geolocator plugin containing a fix for this issue.

That's awesome, thank you for taking the time to track it down, @mvanbeusekom! I've just tested it, and it works perfectly. 馃檪

Was this page helpful?
0 / 5 - 0 ratings