You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The FAQ already includes an entry on custom actions, and I have now added an entry on custom events.
I have also added this FAQ:
How do I communicate between the UI and background isolates
As per the README file:
Keep in mind that your Flutter UI and background task run in separate isolates and do not share memory. The only way they communicate is via message passing. Your Flutter UI will only use the AudioService API to communicate with the background task, while your background task will only use the AudioServiceBackground API to interact with the clients, which include the Flutter UI.
There are a number of predefined messages you can pass from the UI to the background isolate via the AudioService API such as play, pause, seekTo, skipToNext, etc. If you want to send another message that is not one of the predefined messages in this API, you can use customAction (See "How do I send a custom action?").
There are also a number of predefined messages you can pass from the background to the UI isolate via the AudioServiceBackground API such as setState, setMediaItem and setQueue. If you want to send another message that is not one of the predefined messages in this API, you can use sendCustomEvent (See "How do I send a custom event?").
This issue has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs, or use StackOverflow if you need help with audio_service.
(The runtime error: Unhandled Exception: Invalid argument: Instance of 'StopWatchTimer').
How can I properly establish communication between these two Class in order to use the same "StopWatchTimer" instance in both???
The text was updated successfully, but these errors were encountered: