Baseflow / Baseflow/flutter-geolocator

[Bug]: The app is still running in background event if it's killed

Open
#1,395 31 comments 4 reactions 0 assignees View on GitHub
background-foreground-location 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

Just have notification configured and run the app. When you kill it you get:
`There is still another flutter engine connected, not stopping location service`

### Expected results

The app should be killed and notification should be removed

### Actual results

The app still is running and notification is still there. This is draining users battery.

### Code sample

Code sample

```dart
[Paste your code here]
```

### Screenshots or video

Screenshots or video demonstration

[Upload media here]

### Version

10.1.0

### Flutter Doctor output

Doctor output

```console
[Paste your output here]
```

Contributor guide

Open the contributing guide

Research direction

Start by reproducing the Android case with notification configured, using the reported message about another Flutter engine and the location service. Trace the Android location service and notification shutdown path, then verify that killing the app stops the service and removes the notification without continuing battery use.

Written by the indexing model from the issue text.

Assessment

Tech stack
android, dart, flutter
Domain
mobile
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Quiet
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.