Baseflow / Baseflow/flutter-geolocator

Reuse existing Notification for Android Foreground Service

Open
#1,200 2 comments 9 reactions 0 assignees View on GitHub
background-foreground-location P3 platform: android type: enhancement
Dominant language
Dart
Stars
1.3k
Forks
803
Avg merge
8h 16m
Merged PRs (30d)
1

Description

## 🚀 Feature Requests

It would be nice if we are able to reuse an existing notification instead of creating a new one.

### Contextualize the feature
Let's say you have multiple ForegroundServices in your Flutter App and you want to show a single notification for all of those services. You can take care of creating the notification by yourself and then pass this notification to this (and maybe other) plugin(s) and don't spam the user with notifications.

### Describe the feature
Add the option to pass a `notificationId` to the `positionStream` instead of creating a new one. Error handling needs to be done in case the notification or the channel doesn't exist.

### Platforms affected (mark all that apply)
- [ ] :iphone: iOS
- [x] :robot: Android

Contributor guide

Open the contributing guide

Research direction

Start by tracing the Android implementation of positionStream and how it creates or selects foreground-service notifications. The feature is done when positionStream can receive an existing notificationId and reports an error when the notification or its channel does not exist; the issue does not name specific files or tests.

Written by the indexing model from the issue text.

Assessment

Tech stack
android, dart, flutter
Domain
mobile
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 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.