class Chats
lateinit var currentState: State
Current XMPP session state. |
|
val rx: ChatsRx |
fun addListener(listener: ChatsListener): Unit
Adds a listener to receive different chats events. |
|
fun connect(isDebugEnabled: Boolean = false): Unit
Connects a chat session. |
|
fun disablePushNotifications(onCompletion: (SippoClientError?) -> Unit): Unit
Disable the reception of chat push notifications. |
|
fun disconnect(): Unit
Disconnects a chat session and disables the chat push notifications. This should be called on logout. |
|
fun enablePushNotifications(context: Context, onCompletion: (SippoClientError?) -> Unit): Unit
Enable the reception of chat push notifications. In order to enable them you need to have registered a Firebase push token beforehand (@see Sessions' setPushToken method). |
|
fun removeListener(listener: ChatsListener): Unit
Removes the specified listener. |
|
fun suspend(): Unit
Suspends a chat session. This should be called when the app enters background in order to receive chat push notifications. |