Baseflow / Baseflow/flutter-geolocator

Stopping Background Location Service and Unregistering Listeners

Open
#1,536 10 comments 0 reactions 1 assignee Claimed by @TimHoogstrate View on GitHub
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).

### Please select for which platform(s) you need help

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

### Your question

our Android application initiates background location updates upon user login. However, upon user logout, it's essential to gracefully stop the background service responsible for location updates and unregister all associated listeners to optimize resource usage and ensure proper application behavior.

**So How can we stop background service and dispose all listeners ( stream) in case of user logout or we want to stop listning the location on simple button click**

### Version

12.0.0

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.