android icon indicating copy to clipboard operation
android copied to clipboard

Workaround `MAX_PACKAGE_NOTIFICATIONS`

Open powellnorma opened this issue 1 year ago • 3 comments

Let's say I have a script that sends me a "warning" every 30s or so. Now I leave the room for ~30min. In that time, the script already has send > MAX_PACKAGE_NOTIFICATIONS (~= 50) notifications, so I never get notified, and miss the crucial thing the script wanted to remind me of.

A workaround is mentioned e.g. here: https://medium.com/mindorks/the-notification-limit-per-app-in-android-94af69a6862c

Basically we'd have to remember past notifications send, e.g. in a double-ended queue, and once that queue is >= MAX_PACKAGE_NOTIFICATIONS, cancel the oldest notifications.

Is anyone aware of a simpler workaround? What are you thoughts on this?

powellnorma avatar Jun 25 '24 12:06 powellnorma

Why do you receive warnings every 30s? You could also argue the other way around. When canceling the oldest notification you could lose a critical alert.

jmattheis avatar Jun 25 '24 19:06 jmattheis

Why do you receive warnings every 30s?

It's so that I don't miss it - The notification contains a link to a custom web app where I can turn the notification off (or delay it).

When canceling the oldest notification you could lose a critical alert.

Fair - how about we make this feature opt-in? It could also be on per channel/App basis - Some Apps can get their notification cancelled (once the limit is reached), others not

powellnorma avatar Jun 30 '24 19:06 powellnorma

how about we make this feature opt-in?

I don't want to support every use-case in Gotify to keep it simple and maintainable. This feature doesn't seem like something many users need.

jmattheis avatar Jul 02 '24 19:07 jmattheis