-
-
Notifications
You must be signed in to change notification settings - Fork 234
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
Show message content in iOS push notification #49
Comments
Can confirm, text preview is available over android with a unifiedpush provider such as ntfy, don't know about anything else :p |
This does not solve the problem, but might also be interesting: Found it here: https://www.reddit.com/r/FlutterDev/comments/xgxh3d/ios_16_lock_screen_widgets_with_flutter/ |
Supposedly - at least according to some older blog posts this works or at least used to work on element/riot.im |
A Notification Service Extension is required to provide message content without including message content in the APNs payload.1 I've wanted to work on a PR for this, but since a paid developer certificate is needed even for Simulator testing, I haven't gotten far yet. On the technical side, the main challenge is with how Notification Service Extensions run: effectively as a different program with similar filesystem access to the main app. There's no IPC with the main app—after all, it might be closed or backgrounded. Since API and storage is handled in the Flutter VM, either that access would need to be replicated in Swift—especially for Hive, this would be a significant effort—or there'd have to be some way to safely start up the Flutter VM on the off-chance the main app is still running. I'm not familiar enough with Flutter's internals to say if this is possible or how easy it is. Footnotes
|
Thanks for the info. If it's about funding for a certificate, I would be up to help. I haven't coded reasonable amounts of Swift nor Flutter, so I cannot really help with that. I didn't know about element X iOS, I might try that. |
I've gotten a setup to test out Notification Service Extension and wanted to share some of my notes. Since I didn't mention previously: the main reason I'm focusing on an NSE and not As of Flutter 3.16.0, you can properly embed an extension-safe version of the Flutter framework in app extensions—see flutter/flutter#16092 (comment) and this doc. The latter is more focused on Share extensions, but does note this:
Frustratingly, these limits aren't officially documented anywhere. Testing on my end has shown the limit for an NSE to be 24 MB:
So in the case of the app being in a killed state, I'm not sure how far one could get without something like matrix-org/matrix-ios-sdk to get the room/event data—and that doesn't account for E2EE. |
Maybe this flag can help: https://github.com/matrix-org/sygnal/blob/e2eaa5c988d017d0bf0f5516306c023ef3f13f2d/docs/applications.md?plain=1#L155 Or maybe this plugin for Voip. |
I don't get message content (or anything informative, really) on LineageOS (unified push) either. |
This issue is stale because it has been open for 120 days with no activity. |
I think this is still the case |
If I understand it correctly, Signal’s notifications just wake up the main app and then it looks for stuff on the servers on its own. This is done to avoid leaking messages to Apple or Google servers through the notifications, but maybe it could also help here? Also not sure wether Signal users flutter, so I do apologize if my message is useless. |
still not work on iOS 18 |
Description
I am not quite sure if this feature is available on Android already, but it is a major quality of life feature. It would be nice to see the content of the message in the push notification. If the app is in the foreground, this already works, but if not I just get a generic message.
Additional information:
The text was updated successfully, but these errors were encountered: