Skip to content
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

Proposal: provide alternative to FCM using Serverpod #17

Closed
lukehutch opened this issue Jul 1, 2023 · 4 comments
Closed

Proposal: provide alternative to FCM using Serverpod #17

lukehutch opened this issue Jul 1, 2023 · 4 comments

Comments

@lukehutch
Copy link

Serverpod proposes to add its own push messaging solution: serverpod/serverpod#439

I would love to see a solution for Android that doesn't require FCM, but instead pairs your push library with Serverpod as the push notification server.

Do you have any interest in working on something like that, or potentially collaborating on this project?

I can probably contribute some work on Serverpod, but I don't know the client side of push notifications.

@ben-xD
Copy link
Owner

ben-xD commented Jul 22, 2023

Hey @lukehutch, I don't think it is viable to compete with FCM on Android, because of Android's restrictions/limitations. Serverpod could use UnifiedPush, but Android apps would need a persistent notification (forever showing) in the notification tray. I suspect this is unacceptable for most apps, so it's a feature that's not worth doing.

I hope UnifiedPush progresses though, but IMHO Google and Android has full control over it's fate on vanilla Android.

This might still be useful feature for Android forks though, like LineageOS. In that case we would need to add support for UnifiedPush in this package.

@lukehutch
Copy link
Author

@ben-xD There is also Web Push, which should get around this limitation of UnifiedPush. However a Flutter app would have to add a JS service worker. I'm not sure how easy that is, but I'll take a look.

@ben-xD
Copy link
Owner

ben-xD commented Jul 23, 2023

JavaScript running in Flutter won't have as much functionality as if running in a full browser. The browser actually implements the Web Push API.

Also, browsers implement web push using APNs on iOS (e.g. Safari https://webkit.org/blog/13878/web-push-for-web-apps-on-ios-and-ipados/) and FCM on Android, so they follow the same rules.

iOS:

Web Push on iOS and iPadOS uses the same Apple Push Notification service that powers native push on all Apple devices.

Firefox, on iOS and Android https://mozilla-services.github.io/autopush-rs/install.html#configuring-for-third-party-bridge-services

How we connect and use these systems is described in the following documents:

Apple Push Notification service (APNs)
Google's Fire Cloud Messaging service (FCM)

Alternatively you could send notifications to your web app, but that wouldnt reach your flutter app. It certainly won't be able to communicate freely between your web app and Flutter app.

@ben-xD
Copy link
Owner

ben-xD commented Jul 28, 2023

I'll close this for now as I don't think it's actionable due to the limitations I mentioned.

@ben-xD ben-xD closed this as completed Jul 28, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants