Feat: Add Unifiedpush support#5883
Conversation
|
I got a conflict with my own previous PR 🙈 -> I'm fixing it |
|
Oh, and I've seen something strange during the implementation:
|
|
Thank you so much @p1gp1g i'm really looking forward to have UnifiedPush implemented 👍 👍 👍 |
Thanks for reporting! This sounds like #4499 so no need to create a new issue. So yes, we will have to take a closer look how this can happen during registration. |
|
i won't find the time this week. It's on my list though |
|
It's not forgotten. Will come back |
|
@p1gp1g please excuse the delay, we will have a closer look soon. |
|
Should be fast to fix the conflict, let me know when you start reviewing it so I haven't to rebase many times 👍 |
makes sense. i will let you know! thank you 👍 |
|
Hi @p1gp1g |
|
I'm back. Planning to have a look this week |
793a768 to
1cf7a5e
Compare
There was a problem hiding this comment.
Awesome 💯
Thank you for the clear explanations in the code, that pretty much answered the questions i had 👍
I only added minor todos but it should be ready to merge then.
Please
rebase on latest master
and run ./gradlew ktlintFormat
which should already solve some warnings from
https://app.codacy.com/gh/nextcloud/talk-android/pull-requests/5883/issues
feel free to solve further warnings from codacy.
Looking forward to merge it!
|
assigned myself just to keep an overview |
|
Strong support for this PR — sovereign self-hosting use case I'm writing as a self-hoster operating multiple Nextcloud instances for community organizations in Quebec, Canada (4 production instances at the moment, plus more planned over the next year as I onboard new clients). Why this PR matters for our use case: Our entire infrastructure is built around the principle of technological sovereignty — no Google, no Apple, no proprietary cloud dependencies. Today, we have a hard wall: any client who wants Talk push notifications has to go through Firebase Cloud Messaging via the official Play Store APK. For organizations that explicitly chose Nextcloud to escape Big Tech surveillance, having to install a Google-tracked APK to receive notifications is a contradiction we can't ship to clients. The current What this PR enables for the broader ecosystem:
Concrete impact for me: I'm currently fighting two flavor decisions per client onboarding: (1) I want to thank @p1gp1g for the persistent work on this (44 commits since February!) and @mahibi for picking it up in review. If there's anything I can do to help — testing on my self-hosted setup with multiple HPB-enabled instances, providing logs from real usage scenarios, or anything else — please let me know. Looking forward to seeing this merged. 🙏 |
…en UP is enabled Signed-off-by: sim <git@sgougeon.fr>
Signed-off-by: sim <git@sgougeon.fr>
Signed-off-by: sim <git@sgougeon.fr>
Signed-off-by: sim <git@sgougeon.fr>
Signed-off-by: sim <git@sgougeon.fr>
Signed-off-by: sim <git@sgougeon.fr>
Signed-off-by: sim <git@sgougeon.fr>
Signed-off-by: sim <git@sgougeon.fr>
Signed-off-by: sim <git@sgougeon.fr>
…ltiple distrbutor on first run Signed-off-by: sim <git@sgougeon.fr>
Signed-off-by: sim <git@sgougeon.fr>
Signed-off-by: sim <git@sgougeon.fr>
Signed-off-by: sim <git@sgougeon.fr>
Signed-off-by: sim <git@sgougeon.fr>
Signed-off-by: sim <git@sgougeon.fr>
Signed-off-by: sim <git@sgougeon.fr>
|
I've rebased and force-push the branch, I'll do #5884 when this branch is merged then |
End-to-end test report: NC 34 beta 2 + ntfy + /e/OS Teracube — ✅ workingFollowing up on my previous comment. Now have a full end-to-end validation on a real-world self-hosted setup. Posting findings that may help other testers and the maintainers. Setup
🔍 Three findings worth documentingFinding 1 —
|
| id | uid | endpoint | app_types |
|---|---|---|---|
| 1 | admin | https://fcm.googleapis.com/fcm/send/... |
all (Brave webpush W3C, FCM transport) |
| 2 | Test | https://fcm.googleapis.com/fcm/send/... |
all (same) |
| 3 | admin | https://push.serveursdupeuple.net/upU9ZGMjcl1ZYx?up=1 |
talk ⭐ UnifiedPush via self-hosted ntfy |
Talk Android logs at registration time (logcat, abridged):
UnifiedPush: Found distributor with package name foundation.e.ntfy
UnifiedPush: Found distributor with package name io.heckel.ntfy
PushRegistrationWorker: PushRegistrationWorker called via UnifiedPushService#onActivationToken (webPushActivationWork)
PushRegistrationWorker: Activating web push for admin
--> POST https://NC.example.com/ocs/v2.php/apps/notifications/api/v2/webpush/activate
<-- 202 Accepted (138ms)
PushRegistrationWorker: Web push registration for admin activated
NtfyUpDistributor: Sending MESSAGE to com.nextcloud.talk2 (token=...): 2922 bytes
Real-world test — both directions work:
Direction A: desktop → Teracube
- Browser (Brave on desktop, logged as
Testuser) starts a Talk audio call toadmin - Teracube — Talk app fully closed (swiped from recents) — receives the push notification → phone rings
- Pick up on Teracube → audio call connects, bidirectional voice fine
Direction B: Teracube → desktop
4. Same scenario reversed: Talk Android (Teracube, generic flavor APK from this PR) initiates the call to Test (desktop browser)
5. Browser receives the call, picks up, audio works
Push routed entirely through push.serveursdupeuple.net (our self-hosted ntfy), no Google FCM in the path — exactly what self-hosters in sovereignty/compliance contexts have been waiting for. Note: WebRTC media path used the public stun.nextcloud.com:443 (no TURN configured on our side yet) and connected fine in both directions; our setup obviously can't speak to all NAT traversal scenarios but for the basic 1:1 call from Wi-Fi-connected devices it just works.
Why this matters for our use case
We operate Nextcloud for Quebec community organizations whose explicit mandate is sovereignty from Big Tech (Bill 25 compliance, anti-surveillance principles, /e/OS-friendly). Today we ship Talk gplay flavor → clients must install a Google-tracked APK. With this PR + the documentation fixes above, we can ship the generic flavor with full real-time push via our own ntfy backend. This is a real differentiator for self-hosters with sovereignty constraints.
Thanks for the persistent work since February and for picking up the review. Looking forward to seeing this merged.
Signed-off-by: Marcel Hibbe <dev@mhibbe.de>
Signed-off-by: Marcel Hibbe <dev@mhibbe.de>
|
Thank you for testing @alauzon 👍 |
|
Thank you @p1gp1g |
🎉 Update — Scénario "patch master apps on NC 33" also worksFollowing up on my previous comment where I validated the full UnifiedPush chain end-to-end on NC 34 beta 2. Today I tested whether the same approach works on existing NC 33.0.2 deployments without waiting for NC 34 stable (June 9, 2026). Test environment
Result"notifications": {
"push": ["devices", "object-data", "delete", "webpush", "webpush-browsers"]
}
"spreed": { "version": "24.0.0-dev.3" }✅ Capability Why this mattersI had concluded on April 26 that NC 33 was incompatible with the UnifiedPush chain because the stock 33.x
So three viable paths now exist for NC operators wanting UnifiedPush before 34 stable:
Open questions for the maintainersThese would be useful to resolve before this PR merges and operators start patching prod instances:
Happy to provide ZFS snapshots, exact Context: Serveurs du Peuple is a Quebec-based Nextcloud hosting collective with an explicit "anti-FCM" doctrine for mobile push (sovereignty + Five Eyes avoidance). UnifiedPush via self-hosted ntfy is our target architecture for all Android users. This PR is the missing piece — thank you @p1gp1g for the work. |
|
@p1gp1g what are the things you'd be looking for feedback? As for backport ingredients to 33, we'd reject that. We typically don't backports features except in very rare cases and we wouldn't consider this one. Also but not limited to the fact that it is uncommon for Nextcloud. So most of operating parties expect that there is no (larger) behavioral change when upgrading maintenance releases within the same major release version. |
Following web push support in nextcloud/notifications, we can add UnifiedPush support to Talk (and Nextcloud Android) to get push notifications even without the Play Services.
The implementation follows this guide: https://unifiedpush.org/developers/ux/
This feature also gives the possibility to get Push Notifications with the Play Services, without the proxy (Nextcloud servers directly push to Google FCM servers), and without a proprietary library. So this is an accepted way to use FCM for application in F-Droid. => This is in a 2nd PR, already ready.
PS: The description is closed to Nextcloud PR, but the information apply here too
Fix #257
🖼️ Screenshots
🏁 Checklist
/backport to stable-xx.x