-
Notifications
You must be signed in to change notification settings - Fork 219
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
Replace flutter_local_notifications with a thin API binding using Pigeon #351
Comments
As described at #341 (comment) , I started trying Pigeon today and wrote a draft branch that does this for the method to show a notification, as well as a couple of other methods we don't yet use in main. So I'll plan to clean that up and send it. I might go ahead and cover the rest of the library (since what I already have is the most complex of the methods we use), or might leave that for later. |
(Just another data point of why it would be better to have our custom platform integration for some APIs) Yesterday I experimented with #128 and my draft branch uses But while implementing it, I thought it would also be great to have the notifications be in the "Conversations" space of the notification panel (available since Android 11), including with the new notification UI that "Conversations" space provides. To implement that we would first need to create dynamic "Conversation Shortcuts" (could be per Realm or per Stream) using You can read more about Conversation Shortcuts & Conversation Notifications here. There are these two packages I found that provide a wrapper around |
Interesting, thanks! I'd be very glad to see that as a PR 😄 (On a quick read-through, the one significant thing it looks like it needs is tests.)
Hmm, yeah, that would be neat. And I agree, the way to do that will probably be via whipping up the platform integration ourselves. |
Sure, I plan to send it after your PR for replacing
Created a discussion for it on here |
This delivers the first major tranche of zulip#351, switching from package:flutter_local_notifications to our own thin API binding based on Pigeon. With this commit, we've converted over one of the handful of different methods we use from that package, and it's the most complex of them by a substantial margin. Fixes-partly: zulip#351
OK, sent #592 for that conversion to Pigeon. That PR doesn't completely remove So I think that's ripe for you to experiment with rebasing your draft branch atop #592 and using the new mechanism: use If you find rough edges in that flow or any questions come up, please comment on the PR or in a thread in |
This delivers the first major tranche of zulip#351, switching from package:flutter_local_notifications to our own thin API binding based on Pigeon. With this commit, we've converted over one of the handful of different methods we use from that package, and it's the most complex of them by a substantial margin. Fixes-partly: zulip#351
This delivers the first major tranche of zulip#351, switching from package:flutter_local_notifications to our own thin API binding based on Pigeon. With this commit, we've converted over one of the handful of different methods we use from that package, and it's the most complex of them by a substantial margin. Fixes-partly: zulip#351
… with pigeon Updates zulip#351
… with pigeon Updates zulip#351
… with pigeon Updates zulip#351
… with pigeon Updates zulip#351
… with pigeon Updates zulip#351
… with pigeon Updates zulip#351
… with pigeon Updates zulip#351
… with pigeon Updates zulip#351
When we complete this, as a followup we should also try to remove the |
For our initial implementation of notification UI #122 (introduced in #344), we use the package
flutter_local_notifications
. That's because it's what's currently recommended by Flutter upstream for showing a notification, and because I looked around a bit a few months ago and concluded that it was the best existing option for that.As discussed at #344 (comment) and in chat, though, that package has quite a bit of baggage for functionality we'll never need, like timers. It also goes for an unfortunate pattern — reminiscent of React Native and its ecosystem, in fact — of providing a bunch of logic of its own, so that the API it presents is different from that of the underlying platform and adds its own quirks, bugs, and lack of documentation. For example, the issue I filed which is discussed at #344 (comment) .
So I don't find this package very satisfying, and I think it's likely that we'll ultimately want to rip it out in favor of something we write ourselves. The plan would be:
The text was updated successfully, but these errors were encountered: