Skip to content

Feat/unifiedpush#16526

Open
p1gp1g wants to merge 19 commits intonextcloud:masterfrom
p1gp1g:feat/unifiedpush
Open

Feat/unifiedpush#16526
p1gp1g wants to merge 19 commits intonextcloud:masterfrom
p1gp1g:feat/unifiedpush

Conversation

@p1gp1g
Copy link

@p1gp1g p1gp1g commented Feb 16, 2026

Following web push support in nextcloud/notifications, we can add UnifiedPush support to the Android application*, to get push notifications even without the Play Services.

The implementation follows this guide: https://unifiedpush.org/developers/ux/

  • The generic flavor offers UnifiedPush by default, and will use it if a distributor (= an application that can be used as a Push Service) is available
  • The GPlay flavor (and the others) uses FCM by default
  • On the 2 flavors, if a distributor is available, you have a new setting that allows to enable/disable UnifiedPush
  • If the user has many distributors (nearly never the case - but that means the user knows what UnifiedPush is!), a 2nd setting is offered, to change the distributor
  • During first startup, the push notification is setup. With the generic flavor, if the user has many distributors, and hasn't selected a default yet (again, nearly never the case - the default is a OS wide default), a dialog is shown to introduce the OS screen.

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.

Fix #11898
Fix #5510
Fix #8684
Fix #3333 (with the 2nd PR)

* We could add it to the Linux app too, but I haven't, at least yet.

🖼️ Screenshots

Coming, I will update this description

🏚️ Before 🏡 After
image Screenshot From 2026-02-16 23-11-48

🏁 Checklist

  • Tests written, or not not needed : I don't know what can be done

@p1gp1g
Copy link
Author

p1gp1g commented Feb 16, 2026

And I'll start by fixing some conflicts 👍

Signed-off-by: sim <git@sgougeon.fr>
The capability doesn't have an accountName, and therefore doesn't update the user cache

Signed-off-by: sim <git@sgougeon.fr>
…e message

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>
To catch easily when we do UnifiedPush or Common push tasks

Signed-off-by: sim <git@sgougeon.fr>
Signed-off-by: sim <git@sgougeon.fr>
… a distributor

Signed-off-by: sim <git@sgougeon.fr>
…nregistration

Signed-off-by: sim <git@sgougeon.fr>
Signed-off-by: sim <git@sgougeon.fr>
private fun appTypes(): List<String> = context.packageManager
.getLaunchIntentForPackage(APP_NEXTCLOUD_TALK)?.let {
listOf("all", "-talk")
} ?: listOf("all")
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That is to get all notifications, except talk ones if talk is installed. But:

  • We can decide to never receive talk notifications (if a user wants talk notif, they probably use Talk app)
  • And it would be better to list the applications we want to receive notifications from

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What about talk notifications? Is it expected that the talk app will independently handle unifiedpush notifications too?

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm cleaning up the code to open the pull request

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

3 participants