mastodon-android icon indicating copy to clipboard operation
mastodon-android copied to clipboard

Integrate Unified Push

Open Mr-Bajs opened this issue 2 years ago • 4 comments

It would be great if the app was integrated to allow Unified Push, an push notification service that allows you to selfhost your notifications. Rather than using Googles servers or using the apps instance server.

Using Googles android push notifications is great in the way it uses a distributor app/service. The pros with this is that it saves power on you battery instead of relying on each app to have a notification service.

Many if not most FOSS-apps use their own connection för notifications, which uses battery power. So UnifiedPush is a free and open source replacement for the Googles notification service that works sort of the same, but it open source and you can choose your own distributor rather than Googles, like Nexcloud.

I think it's important to have this option for those who isn't comfortable using google servers but also would like to have the power benefits of using a notification distributor.

https://github.com/UnifiedPush

Mr-Bajs avatar Feb 03 '23 15:02 Mr-Bajs

FYI I put here this resource https://unifiedpush.org/developers/intro/

it's already been implemented on many apps. Thank you.

xmgz avatar Feb 17 '23 08:02 xmgz

There is a fork with UnifiedPush support: https://github.com/LucasGGamerM/moshidon/blob/master/mastodon/src/main/java/org/joinmastodon/android/UnifiedPushNotificationReceiver.java

I hope someone will merge it or a cleaner implementation into the main client.

000exploit avatar Dec 17 '23 22:12 000exploit

Using an Embedded FCM Distributor, "normal" FCM users won't notice a difference. This embedded Distributor could also only be shipped in the gplay / non-fdroid/non-github flavor, if we want I started some work on this based on the abovementioned fork, but it is not yet able to receive messages

konradmoesch avatar Dec 24 '23 19:12 konradmoesch

Does work quite well on my fork (https://github.com/konradmoesch/mastodon-android/tree/unifiedpush) The transmitted message can not be decrypted (keys stored in HTTP headers can not be accessed in UP), so i get the notification from the server again. I will try to find the modifications needed for the fcm proxy (server side) to be able to decrypt and then make a pr. Feel free to test in the meantime

konradmoesch avatar Dec 25 '23 11:12 konradmoesch