There is a slight difference between the iOS and Android APIs, driven by platform-specific best practices. On Android, chat lifecycle events are not exposed as dedicated callbacks (such as chatEnding / chatEnded on iOS). Instead, they are emitted via the stateChanged() callback.
Specifically, the Android SDK does emit both Ending and Ended events, which are equivalent to the iOS events, but they are delivered as state transitions:
override fun stateChanged(prevState: String, state: String, data: Any?) {
when (state) {
StateEvent.Ending -> handleChatEnding()
StateEvent.Ended -> handleChatEnded()
}
}
Using this approach should allow you to implement consistent handling for idle chat and related logic across both platforms.
For additional reference, you may find this documentation helpful:
https://developer.genesys.cloud/commdigital/digital/webmessaging/mobile-messaging/messenger-mobile-sdk/android/clear-conversation#successful-clear
Please let me know if you are still experiencing issues or if this does not fully address your use case. I will be happy to look deeper if needed.
------------------------------
Anton Afanasiev
Manager, Mobile Development
------------------------------
Original Message:
Sent: 12-22-2025 20:34
From: Tzi Young
Subject: Messaging SDKs Queries
Hi @Anton Afanasiev,
Thank you for your response. We're trying to develop Mobile Messenger, both Android Messenger and iOS Messenger.
Because upon checking, it seems like the Android Messenger SDKs [https://developer.genesys.cloud/commdigital/digital/webmessaging/mobile-messaging/messenger-mobile-sdk/android/] does not emit the Ended/Ending events upon user-initiated end chat or agent initiated end chat. On the contrary, iOS is working as expected (chatEnded, chatEnding). Without these events, we couldn't have consistent handling on our end for certain idle chat features.
Are there any workarounds for Android Messenger SDKs?
------------------------------
Tzi Young
Original Message:
Sent: 12-22-2025 13:02
From: Anton Afanasiev
Subject: Messaging SDKs Queries
Hi @Tzi Young,
Thank you for bringing this to our attention. Are you asking about Web OR Mobile Messenger? The chat state diagrams might differ across platforms.
------------------------------
Anton Afanasiev
Manager, Mobile Development
Original Message:
Sent: 11-25-2025 20:52
From: Tzi Young
Subject: Messaging SDKs Queries
Hi Community,
I have a few questions regarding the Messaging SDKs and would appreciate any insights from the community:
- Is there a chat state diagram available that outlines the possible state transitions (e.g., started → ended)?
- For chat state 'unavailable', can I get some clarification on whether this could be used to indicate that no agents are available?
- For chat state 'unavailable', is there any error messages being displayed in the chat container? If so, how do we test this out?
- Is there any chat state event for when the agent is (1) typing, (2) joining, (3) receiving a message from the agent, this would be important for us to determine if the chat is in idle state.
- If (4) is not available, is there any other indicator that we can use to determine the chat is inactive based on the chat state events.
Looking forward to your input. Thanks!
Regards,
Tzi Young
#MobileMessenger
#PlatformSDK
#WebMessaging
------------------------------
Tzi Young
------------------------------