Integrate UI SDK
Step 1: Initialize the SDK
Initialization binds the SDK to Android’s context, thereby allowing it to respond to the connection and state changes.
Note: The ChannelizeUI.initialize(channelizeUIConfig) method should be called once across your Android client app. We recommend you to initialize the Channelize UI SDK in the onCreate() method of the Application instance.
// If you want to customize the UI then you can access the ChannelizeUIConfig class and set the customized method's value. Few of them are mentioned below: ChannelizeUIConfig channelizeUIConfig = new ChannelizeUIConfig.Builder() .enableForward(false) // If you want to show the forward message option in conversation screen. .enableQuoteMessage(false) // If want to show the quote message option in conversation screen. .showDateHeader(false) // If want to show the date header in conversation screen. .enableVoiceRecorder(false) // If want to show the voice recorder option in conversation screen. .build(); ChannelizeUI.initialize(channelizeUIConfig);
Step 2: Connect to Channelize server
// In order to get the updates in UI SDK you need to Connect to the channelize server if you want to publish/receive the real time updates. Channelize.connect();
Launch Channelize UI SDK:
If you want to open the default home page of the Channelize Messaging then you can open it with the following code:
// To launch Channelize UI SDK. Intent intent = new Intent(context, ChannelizeMainActivity.class); startActivity(intent);