What is the difference between the onConnectionStateChanged callback and the onRoomStateChanged callback in ZIM SDK? When are they triggered respectively?
2023-06-14
Products / Plugins:In-app chat
Platform / Framework:iOS / Android / macOS / Windows / Web / Mini Program / Flutter / Electron / ReactNative / Unity3D
- onConnectionStateChanged is a callback triggered when
the user's online connection state changes, and onRoomStateChanged is a callback triggered whenthe user is in a room and the room state changes. - If the user only calls the login interface to log in to ZIM, only the onConnectionStateChanged callback is returned.
- If the user calls both the login interface to log in to ZIM and calls createRoom or enterRoom to enter a room, both onConnectionStateChanged and onRoomStateChanged callbacks will be returned.
