Initialization

To initialize the Chat it is necessary to add the object com.indigitall.android.chat.Chat in the layout where the Chat will be displayed. We must add the following lines of code on the layout xml:

<com.indigitall.android.chat.Chat
        android:id="@+id/your_id"
        android:layout_width="match_parent"
        android:layout_height="match_parent"
        app:channelKey="your_channel_key"
        />
  • id id of the object.
  • channelKey is an alphanumeric string that identifies your indigitall project.

Chat actions

To be able to perform actions when the Chat is shown or hidden, event handlers or listeners can be implemented. To do this add the following code:

class YourActivity: ChatListener{
  ...
  override fun onChatHidden() {
        //Do something
    }

    override fun onChatShown() {
        //Do something
    }
}