Closed ndthinh1810 closed 3 years ago
For how to use shared_preference_app_group plugin, you can refer to this Flutter App project https://github.com/zegoim/zego-express-example-screen-capture-flutter, it demonstrates how to implement screen capture and live broadcast on Flutter (Android/iOS).
The shared_preference_app_group
plugin related code is here:
I have read your code, but I want to handle stream state while streaming, store the stream state into appgroup user default and then get the stream state in the flutter side was not look like a call back. How do I know when the value of that key change in order to change the stream_state Text in the flutter side. It seem like this shared_preference_app_group did not support observing. Thank you!
You can use the cross-process notification feature of iOS, which I used it in the finishReplayKitBroadcast
method.
So you can post a notification in the broadcast extension process (the sample handler side) and listen in the main app process (the flutter side)
Further ref: https://stackoverflow.com/a/48558837/7027076
And how do I add observe in the flutter side without CFNotificationCenterAddObserver
Simply search for a CFNotificationCenter
dart warpper plug-in on pub.dev, if not, write one yourself and distribute it to pub/github ^_^
Thank you!
Hello its me again, I have a question. So in my replaykit laucher project, the stream, the state and the configuration of it was all in the broadcast extension sample handler file, I can not access or modify it from flutter view. So can your 'Shared preference with app group' plugin do that. And if it can, how can I do that? Thank you Patrick. Here is the samplehandler.swift