Skip to content

Replacing/cancelling a notification after a duration #6

@theefer

Description

@theefer

As far as I was able to tell, there is no way to replace or cancel a notification (scheduled or immediate) at a given later point in time?

I am working on an application that involves baking timers and I would like to show an initial notification (A) with the ETA, and replace it with a different, buzzing notification (B) when the timer elapses. So far my attempts seem to reveal that if I use the same notification tag, there can only ever be one notification with it, so showing an immediate notification A and then scheduling a notification B for later with the same tag results in A being cancelled and only B appearing when its time arrives. I can use different tags so both would show, but then A would remain visible once B appears.

A more intensive use case would be to periodically update a notification on a schedule. Think of how the native Android timer displays the time remaining, updated every second. Even if once a second might be too greedy, it would be great to be able to refresh the ETA displayed in the notification every minute, or even every 5-10 minutes. I was hoping to achieve this by scheduling "notification updates", but as per the scenario above, it doesn't seem possible to schedule updates to a notification?

Am I missing anything, or is there any way to support these use cases?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions