-
-
Notifications
You must be signed in to change notification settings - Fork 643
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
Notifications don't work on Android without Google services #3838
Comments
I understand that it won't happen for a while but I just want to put it out there that I would like to see native FCM-less mobile notifications! |
Well it has the potential to happen sooner than expected 😊 Zulip could add an option to configure a self-hosted OpenPush instance for push notifications in addition to FCM. The spec is almost finished, a Python server is done, and a library and reference implementation are in the works. It was presented at FOSDEM and, in my opinion, has a lot of promise. |
Very interesting! Thanks @Amolith for the update. I agree that that looks like a plausible approach. |
Copied from this CZO message that I just sent:
|
FCM is not available here in China. We really need this to get Zulip notifications work on Android. |
https://unifiedpush.org is a set of specifications and libraries that is currently being used by other FOSS communication apps like FluffyChat (Matrix), Fedilab (Mastodon), TRIFA (Tox). While, I'm personally not familiar with Zulip, UnifiedPush caters to a similar audience as OpenPush, so I think it might be relevant here. UP also offers FCM fallback, so the app just needs to use one library (for Android). |
Using UnifiedPush is a good idea. Really hope it can be implemented soon. |
We'v heard another recommendation of this at #1270 (comment):
|
Casting a vote in favor of the UnifiedPush suggestion, for what it is worth, based on a recent experience trying and failing to set up push notifications to an account logged in to the Android mobile app (latest version installed from the apk on Github) being run on GrapheneOS, even with Google Play Services installed. Thanks to @alexmv we can see the server side of things is working fine, but for some reason something on the mobile device's end isn't catching on that it needs to show a notification. Granted this is a fairly niche setup, but perhaps there is an argument to be made in general for reducing dependencies on less open projects. Otherwise Zulip is amazing, many thanks to all the people who have worked and are working on it! Update: Seems the notifications do work on the latest version of GrapheneOS with Google Play Services running in their usual way - undercutting somewhat the argument for UnifiedPush but wanted to leave this info to encourage anybody who may come across similar issues in the future |
Can I ask on this: can a zulip bot be a temporary hack to make this work with something like ntfy? |
In case you need more recent transition examples: Tusky (Mastodon) and Element (Matrix) recently started to offer UnifiedPush support. At least Element provides it in both their Google Play and F-Droid versions and allows you to switch at runtime (Settings > Notifications > Other > Notification method) – the F-Droid version providing the choice between the installed UnifiedPush distributors and "background sync" / polling, but not native FCM. Tusky just selects a notification method once automatically – if at the time UnifiedPush is available, it uses that, otherwise it falls back to polling. You can bundle your application with a UnifiedPush FCM distributor for Google Play, so that the default for those users will work well independently of whether they set up UP or not. |
We've had another recommendation of UnifiedPush at https://chat.zulip.org/#narrow/stream/48-mobile/topic/Push.20Notifications.20on.20Mobile.20.28Android.29/near/1497946. |
Definitely need this, does anyone have a decent workaround until this is done? Not getting notifications from Zulip on my phone because of this. |
@abc See my comment above. |
We've had another request for UnifiedPush at https://chat.zulip.org/#narrow/stream/48-mobile/topic/Push.20Notifications.20on.20Mobile.20.28Android.29/near/1521723. |
I run Calyxos which uses microG to replace Google's proprietary libraries, while still allowing "apps developed for Google Cloud to Device Messaging (C2DM) to use the compatible Google Cloud Messaging service" developed by the microG team. { Maybe microG an easier thing to support than an alternative push system? |
@adrienneteicher, thanks for the report. Did you install Zulip from the APKs we publish, or from somewhere else? |
Installed from f-droid.
Thanks!
22 Mar 2023 17:57:32 Chris Bobbe ***@***.***>:
…
@adrienneteicher[https://github.com/adrienneteicher], thanks for the report. Did you install Zulip from the APKs we publish[https://github.com/zulip/zulip-mobile/releases], or from somewhere else?
—
Reply to this email directly, view it on GitHub[#3838 (comment)], or unsubscribe[https://github.com/notifications/unsubscribe-auth/AGYIPIHY5DSKLNKC5QZQP2LW5MVPXANCNFSM4KK6VEUA].
You are receiving this because you were mentioned.[Tracking image][https://github.com/notifications/beacon/AGYIPIBYC2FXEK6PHD7EFBDW5MVPXA5CNFSM4KK6VEUKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOLA274PQ.gif]
|
We're aware that the F-Droid builds remove notification support, in a way that would still affect you with your setup.
Interesting! If you're willing, I recommend installing our APK; it sounds like that should fix notifications. If you still have trouble, please file a new issue or email support@zulip.com. |
Thanks Chris,
I tried the apk from github and I can see that zulip has registered itself for GCM in the microG settings, so that probably did it!
I'll wait until I get some messages tomorrow and let you know
22 Mar 2023 18:38:23 Chris Bobbe ***@***.***>:
…
We're aware that the F-Droid builds remove notification support, in a way that would still affect you with your setup.
I don't think it normally requires app developers to do anything to specifically support microG.
Interesting! If you're willing, I recommend installing our APK[https://github.com/zulip/zulip-mobile/releases]; it sounds like that should fix notifications. If you still have trouble, please file a new issue or email ***@***.***
—
Reply to this email directly, view it on GitHub[#3838 (comment)], or unsubscribe[https://github.com/notifications/unsubscribe-auth/AGYIPIDH4GY23ODWLPXAKF3W5M2I5ANCNFSM4KK6VEUA].
You are receiving this because you were mentioned.[Tracking image][https://github.com/notifications/beacon/AGYIPIBFOEN3F75TYE3NDTDW5M2I5A5CNFSM4KK6VEUKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOLA3O74Q.gif]
|
Hi. That worked! Thank you very much. Might I suggest clarifying the error message around notifications for the f-droid build so that users can solve this problem for themselves. |
Definitely agreed. I've now filed #5693 for that. |
Hi @chrisbobbe, THANK YOU SOOOOOOOOOOOOOOOO MUCH!! You saved my ass!! Excuse my language!!!!!!!! |
For me that doesn't make a difference, because I use a fully ungoogled gsi (LeOS) with a MicroG that doesn't connect to google, so push through google doesn't work of course (and that's how I want it!). |
This will take considerable work to change, and the number of people it affects is small, so it's not something we'll fix soon. But here's an issue to put the fact on record, in the hopes that it saves people some debugging in the future.
For the mobile app to learn when it should show a notification, we rely on FCM (Firebase Cloud Messaging, formerly known as GCM / Google Cloud Messaging) on Android, and APNs on iOS. These centralize the work of polling a server for updates across all the apps on a device, which is essential for getting prompt notifications without a lot of drain on the battery.
One consequence is that on a device with neither of those services available -- which means an Android device without Google Play Services -- we don't show notifications at all. The app works just fine when you launch it and use it in the foreground; it just never shows a notification.
This turned out to be the cause of the report in #3835 that notifications weren't working.
To make notifications work on a device without FCM or APNs, we'd need to have the app run in the background and poll for updates itself. (Of course we'd only do that when it wasn't possible to use those services.) As I wrote in a chat thread:
See also other remarks in that thread.
The text was updated successfully, but these errors were encountered: