Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Stackable notification can't be canceled #90

Open
kukadiajayesh opened this issue Aug 3, 2023 · 1 comment
Open

Stackable notification can't be canceled #90

kukadiajayesh opened this issue Aug 3, 2023 · 1 comment

Comments

@kukadiajayesh
Copy link

kukadiajayesh commented Aug 3, 2023

I'm developing chat application where I need to show notifications with stack for each user's chat. Once user opens that conversation all unread notifications should be removed. To cancel I used Notify.cancelNotification method but it is not cancelling.

Later, after lots of debugging I found when I set Stackable.key to show stack notification, and this key passed as tag on notification posted by io.karn.notify.internal.NotificationInterop#showNotification actually calls notifyAsUser with tag and id.

Hence, when I try to cancel it I must pass tag and id both params. But in lib there is no cancel method with tag param.

Please add tag param for cancel notification

Screenshot 2023-08-03 at 23 55 21
@kukadiajayesh
Copy link
Author

Right now to cancel the stackable notification I have to call

fun cancelNotification(tag: String?, id: Int) {
        (context.getSystemService(Context.NOTIFICATION_SERVICE) as NotificationManager).cancel(tag, id)
}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant