Baseflow / Baseflow/flutter-geolocator
[Bug]: foreground service seems to be missing `FOREGROUND_SERVICE_LOCATION` permission
- 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
It seems the locationStream is not stable (i.e. having random pauses) with foreground service. It seems it is due to missing the `FOREGROUND_SERVICE_LOCATION` permission. I don't know android very well and don't have concrete proof. But it seems to be required per doc and does seem to fix the issue.
If this is indeed require, then maybe we should mention it in the doc/installation guide?
(cc: @kuailezhiyuan)
### Expected results
Having `` in `AndroidManifest.xml`.
### Actual results
n/a
### Code sample
n/a
### Screenshots or video
_No response_
### Version
4.5.4
### Flutter Doctor output
n/a
Contributor guide
Research direction
Start with the Android foreground-service and location configuration described in the README installation guide, then inspect how AndroidManifest.xml permissions are provided. Verify whether FOREGROUND_SERVICE_LOCATION is required for locationStream foreground services and whether the plugin or documentation should declare it; done means the permission requirement is correctly handled and documented.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- android, dart, flutter
- Domain
- mobile, mobile-dev
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100