Open james04gr opened 3 years ago
where you able to fix it
where you able to fix it
No...nobody cares for this github project!
This my working code
websocketJob = scope.launch(dispatchers.io) {
for (event in eventChannel) {
Timber.d("$event")
when (event) {
is WebSocket.Event.OnConnectionOpened<*> -> receiveMessages()
is WebSocket.Event.OnConnectionFailed -> onConnectionFailed(event.throwable)
is WebSocket.Event.OnConnectionClosed -> onConnectionDropped(event.shutdownReason)
is WebSocket.Event.OnConnectionClosing -> onConnectionClosing(event.shutdownReason)
is WebSocket.Event.OnMessageReceived -> Unit
}
}
}
private fun receiveMessages() {
messagesJob = scope.launch(dispatchers.io) {
for (message in myService.observeMessage()) {
logger.logMessageReceived(message)
when (message) {
.......
}.exhaustive
}
}
}
I have created my Socket Interface with the @Receive observeEvents and @Send sendMessage and also the @Receive observeApiMessage methods. I can observe the events when they happen however the observeApiMessage never gets triggered.
I have a FlowSocket that implements the FlowSocketApi interface and inside my repository i call this.
I never see that print logs