ionic-team / ionic-team/capacitor-local-notifications

[local-notifications] update visible notification

Open
#5 1 comment 0 reactions 0 assignees View on GitHub
Dominant language
Kotlin
Stars
0
Forks
0
Avg merge
11h 50m
Merged PRs (30d)
2

Description

## Feature Request

### Plugin
local-notifications

### Description
I'm trying to create an ongoing notification that can be updated without being replaced (a simple timer). Currently when scheduling a notification with the same ID, LocalNotificationManager -> schedule -> dismissVisibleNotification is called causing the notification to be replaced each time. Simply commenting out the line `dismissVisibleNotification(id)` achieves the desired result as android will not replace the notification only update it.

### Platform(s)
Android

### Preferred Solution
Add something to the ScheduleOptions/LocalNotificationSchema to make it optional

### Alternatives
Remove dismissVisibleNotification(id) ? I'm sure this will have side effects that I'm not aware of.

### Additional Context
https://github.com/ionic-team/capacitor-plugins/blob/8449b188496d710699bc6f5bc031a28f44e29fbe/local-notifications/android/src/main/java/com/capacitorjs/plugins/localnotifications/LocalNotificationManager.java#L147C1-L147C44

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.