Code Monkey home page Code Monkey logo

Comments (12)

Mikaela avatar Mikaela commented on July 26, 2024 2

I think this is still the case

from fluffychat.

github-actions avatar github-actions commented on July 26, 2024 1

This issue is stale because it has been open for 120 days with no activity.

from fluffychat.

Damaj301damaj-lol avatar Damaj301damaj-lol commented on July 26, 2024

Can confirm, text preview is available over android with a unifiedpush provider such as ntfy, don't know about anything else :p

from fluffychat.

mietzen avatar mietzen commented on July 26, 2024

This does not solve the problem, but might also be interesting:
iOS (lock)screen widget with flutter and swift

Found it here: https://www.reddit.com/r/FlutterDev/comments/xgxh3d/ios_16_lock_screen_widgets_with_flutter/

from fluffychat.

step21 avatar step21 commented on July 26, 2024

Supposedly - at least according to some older blog posts this works or at least used to work on element/riot.im

from fluffychat.

snowkat avatar snowkat commented on July 26, 2024

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

  1. This is how Element X iOS presents notifications: https://github.com/vector-im/element-x-ios/blob/develop/NSE/Sources/NotificationServiceExtension.swift

from fluffychat.

step21 avatar step21 commented on July 26, 2024

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.

from fluffychat.

snowkat avatar snowkat commented on July 26, 2024

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 flutter_local_notifications (which uses UNUserNotificationCenterDelegate, I believe?) is to handle notifications when the app is killed. That said, maybe it's best to handle any cases rather than none, so I'll look at that side again.

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:

Due to the memory limitations of app extensions, it is only recommended to use Flutter to build app extension UI for extension types that have memory limits larger than 100MB. For example, share extensions which have a 120MB memory limit.

Frustratingly, these limits aren't officially documented anywhere. Testing on my end has shown the limit for an NSE to be 24 MB:

fluffychat.1.ui (5): EXC_RESOURCE (RESOURCE_TYPE_MEMORY: high watermark memory limit exceeded) (limit=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.

from fluffychat.

predictron-cloud avatar predictron-cloud commented on July 26, 2024

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.
https://pub.dev/packages/flutter_callkit_incoming

from fluffychat.

predictron-cloud avatar predictron-cloud commented on July 26, 2024

image
On my iPhone with debug I see that the error is only here ^^. It just cannot load the matrix client.

from fluffychat.

lboklin avatar lboklin commented on July 26, 2024

I don't get message content (or anything informative, really) on LineageOS (unified push) either.

from fluffychat.

LuNeder avatar LuNeder commented on July 26, 2024

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.

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.
I’m pretty sure they made an announcement about this back when there was that whole “apple leaking notifications to the usa government” scandal, but tbh I couldn’t find it. The only place I could find mentioning this was an old reddit post linking to this file which shows the server-side implementation, but the iOS side of stuff must be somewhere in their github too.

from fluffychat.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.