Baseflow / Baseflow/flutter-geolocator

[Bug]: ServiceStatus.disabled, but Geolocator.isLocationServiceEnabled will return true

Open
#1,317 3 comments 0 reactions 0 assignees View on GitHub
P2 platform: android type: bug
Dominant language
Dart
Stars
1.3k
Forks
803
Avg merge
8h 16m
Merged PRs (30d)
1

Description

### Please check the following before submitting a new issue.

- [X] I have searched the [existing issues](https://github.com/baseflow/flutter-geolocator/issues).
- [X] I have carefully [read the documentation](https://github.com/Baseflow/flutter-geolocator/blob/main/geolocator/README.md) and verified I have added the required platform specific configuration.

### Please select affected platform(s)

- [X] Android
- [ ] iOS
- [ ] Linux
- [ ] macOS
- [ ] Web
- [ ] Windows

### Steps to reproduce

Start the application ServiceStatus.enabled and LocationPermission.whileInUse. Subscribe to Geolocator.getServiceStatusStream(). Disable service, the stream will return ServiceStatus.disabled, but Geolocator.isLocationServiceEnabled will return true

### Expected results

return false

### Actual results

return true

### Code sample

/*/

### Screenshots or video

_No response_

### Version

geolocator: ^10.0.0

### Flutter Doctor output

[✓] Flutter (Channel stable, 3.13.2, on macOS 13.5.1 22G90 darwin-x64, locale ru-RU)
• Flutter version 3.13.2 on channel stable at /Users/xxx/flutter
• Upstream repository https://github.com/flutter/flutter.git
• Framework revision ff5b5b5fa6 (10 days ago), 2023-08-24 08:12:28 -0500
• Engine revision b20183e040
• Dart version 3.1.0
• DevTools version 2.25.0

[✓] Android toolchain - develop for Android devices (Android SDK version 33.0.2)
• Android SDK at /Users/xxx/Library/Android/sdk
• Platform android-33, build-tools 33.0.2
• ANDROID_HOME = /Users/xxx/Library/Android/sdk
• Java binary at: /Applications/Android Studio.app/Contents/jbr/Contents/Home/bin/java
• Java version OpenJDK Runtime Environment (build 17.0.6+0-17.0.6b829.9-10027231)
• All Android licenses accepted.

[✓] Xcode - develop for iOS and macOS (Xcode 14.3.1)
• Xcode at /Applications/Xcode.app/Contents/Developer
• Build 14E300c
• CocoaPods version 1.12.1

[✓] Chrome - develop for the web
• Chrome at /Applications/Google Chrome.app/Contents/MacOS/Google Chrome

[✓] Android Studio (version 2022.3)
• Android Studio at /Applications/Android Studio.app/Contents
• Flutter plugin can be installed from:
🔨 https://plugins.jetbrains.com/plugin/9212-flutter
• Dart plugin can be installed from:
🔨 https://plugins.jetbrains.com/plugin/6351-dart
• Java version OpenJDK Runtime Environment (build 17.0.6+0-17.0.6b829.9-10027231)

Contributor guide

Open the contributing guide

Research direction

Start by tracing the Android implementation behind Geolocator.getServiceStatusStream() and Geolocator.isLocationServiceEnabled(), using the reported sequence of disabling the service after subscribing. Reproduce the mismatch with the stated Flutter and geolocator versions, then verify that both APIs report the service as disabled.

Written by the indexing model from the issue text.

Assessment

Tech stack
android, dart
Domain
mobile-dev
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.