-
Notifications
You must be signed in to change notification settings - Fork 124
Bidirectional communication #29
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
Comments
Currently, the only way to send data from I've been working on an implementation for a long time to enable bidirectional communication. However, in the process, the And since the If you want to share |
There is no way to persist the ReceivePort on disk in order to recover it after app restart? |
Alternatively, Is there a way to prevent the app from being closed when the foreground service is running? |
By using this plugin, the app can have a screen(Activity) and a service(ForegroundService). Currently, this plugin's It is the correct behavior for the service to restart as the app needs to create a new |
Thank you for your reply. For my project, I can't get rid of bidirectional communication. Unfortunately, it is difficult to adapt this plugin because of how it is designed. Moreover, there is no currently plugin in the web allowing for bidirectional communication in foreground service. Bidirectional communication can be achieved simply by using method channels calls, getting rid of any concept related to dart isolates. Also the fact that the library is meant to run repeatedly a given task represents a serious limitation for my project (why don't let the developer the freedom to run a Timer inside its dart code on the service?). |
I think I have found a way to have a reliable bi-directional communication. See #44 (comment) |
Hi, first of all thanks for the work.
It is not clear to me how I could implement bidirectional communication between the UI and the foreground service isolates.
Currently, it seems that, if the UI wants to send data to the service, it can only use the saveData function.
Moreover, how can I recover the receivePort between app restarts withour restarting the service?
Thank you
The text was updated successfully, but these errors were encountered: