You have the option to adjust the position of the Channel button via the CHTChannelButtonOption.
After making changes to this option, apply it to the property value of CHTBootConfig. For example:
If you wish to customize the appearance of the Channel button, apart from the few pre-set options, you will need to create your own button.
Make sure to hide the default Channel button by calling
ChannelIO.hideChannelButton.Once you've created your button and positioned it as desired, link the
ChannelIO.showMessengerto the button's touch event.
We recommend using onBadgeChanged to display the number of unread messages. If you choose to customize the Channel button, the count of unread messages will not be visible.
To implement the onBadgeChanged, ensure that theCHTChannelPluginDelegate is adopted. For instance:
By default, the SDK delivers the following in-app pop-up notifications to your app, which is applicable when the user uses the app online.
To receive in-app push notifications, you need to adopt theCHTChannelPluginDelegate and implement the onPopupDataReceived method. Here's an example:
To customize the appearance of the In-App Push notifications, you must create and utilize your own in-app push notification screen.
Make sure the default in-app push view remains hidden by setting the
hidePopupoption ofCHTBootConfigtotrue.Perform a new
Bootusing the aboveCHTBootConfig.Utilize the
onPoupupDataReceivedmethod implemented in step 1 to fill in your customized in-app push notification view.
Utilize the track method to track a specific action of the user.
The following is a description of how to log an event when a user makes a purchase:.