In Instanbul we talked a bit about notifications. The current implementation is still the original MVP and v2 never really came to life. So we are left with a very naive implementation that has been patched over time to limit the amount of metadata leaked.
We don’t like it for the following reasons:
- it is still depending on one of the biggest third party lib in the codebase: Firebase. Yes, our push notifications are relying on a Google service, to be sent from one device to another through their server, using a token that is exchanged by contacts when they add each other.
- the previous point is a blocker for the FDroid store
- you might have expectations about when you are suppose to receive a notifications, but currently since you need to exchange tokens, notifications only work between contacts that added each other and who both enabled notifications in the device they are using. (I am not sure how it works with multidevice when one doesn’t have notifications enabled)
So as a result, notifications may sometime feel broken, when they are there and the app is locked they can’t tell more than just “You got a message”, They don’t work for mentions, or any kind of event you might be interested in
Improving them step by step
Remove current implementation and Firebase
We can now publish on FDroid, no notifications, no bugs
They don’t let you run background tasks except basic http, we forget about it
Kickass notifications on Android
We let the app run as a service, we can already start and stop the node while staying logged in. We keep the app in the badckground as a service and periodically fetch messages (based on user settings for frequency and network type).
We can now have more data in the notifications (they are local, user can choose how much data he wants to show in them though, like some other apps it can show nothing when phone is locked).
We can have notifications on mentions, messages from non contacts, follow keywords, dapp can send notifications too via status api.
iOS users have AR poo emojis, they can’t have everything.