We’re building a hybrid agent desktop using Kotlin for the Android layer, but the frontend is a WebView running the Genesys Cloud Web SDK. The issue is handling the microphone mute toggle. When the user hits the mute button in the Android UI, I call the native ConversationManager.getVoiceSession().mute() method. The native call succeeds, but the Web SDK session inside the WebView doesn’t reflect the change. The agent icon still shows as unmuted in the Genesys Cloud UI.
I tried syncing the state by triggering a custom event in the WebView, but the Web SDK’s session.mute() method throws a permission error if called without an active media stream context, which seems to be managed by the native layer in this hybrid setup.
Here’s the Kotlin snippet where I’m attempting to bridge the call:
val session = conversationManager.getVoiceSession()
session?.mute()
webView.evaluateJavascript("window.gcSdk.mute()", null)
The native mute works for the audio stream, but the server-side participant state doesn’t update correctly, or at least the Web SDK client doesn’t know it’s muted. Is there a specific callback or observer in the Android SDK that pushes the mute state to the Web SDK instance? Or do I need to manually patch the participant state via the REST API after muting?