Skip to content

[local-notifications] update visible notification #2252

Open
@jberns88

Description

@jberns88

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

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions