how can you define notify id to update and cancel notify
GramWT opened this issue · comments
WORATUM TOROEK commented
Karn Saheb commented
Hi @GramWT,
You can do the following:
// Build a notification up until the end
val notification = Notify.with(...)
...
// Then show the notion initially
val notificationid = notification.show()
// To mutate the request you can reuse the notification, even though the
// the method is deprecated (only to prevent shooting oneself in the foot)
// you can use it to perform a stable update.
notification.show(notificationId)
// To cancel a notification you can do the following
Notify.cancelNotification(this.context, notificationId)
I will be looking at a more stable way of doing this in the future since the current logic is tailored around the Stacked notifications.
Going to close this for now, but feel free to reopen if you have any other concerns.