ChannelIO

This class provides all necessary methods in order to use Channel.

boot

Boot up ChannelIO with a profile and make it ready to use

public static void boot(ChannelPluginSettings settings, Profile profile, OnBootListener listener)
parametertypedescription
settingsChannelPluginSettingsa setting object
profileProfilea profile object (Optional)
listenerOnBootListenera listener for completion (Optional)

initialize

Initialize an ChannelIO

public static void Initialize(Application application)
parametertypedescription
applicationApplicationApplication object

shutdown

Terminate ChannelIO module

public static void shutdown()

open

Display ChannelIO chat messenger

public static void open(Context context)
parametertypedescription
contextContextContext object

close

Hide ChannelIO chat messenger

public static void close()

openChat

Display a chat room

public static boolean openChat(Context context, String chatId)
parametertypedescription
chatIdStringuser chat id. If it is null, it will open lounge.

show

Display default launcher button

public static void show()

hide

Hide default launcher button

public static void hide()

canShowLauncher

True if it is appropriate to display a default launch, otherwise false

public static boolean canShowLauncher()

setChannelPluginListener

Set a listener that provides set of events in ChannelIO

public static void setChannelPluginListener(ChannelPluginListener listener)

clearChannelPluginListener

Clear listener for ChannelIO

public static void clearChannelPluginListener()

addChannelPluginListener (Deprecated)

Add a listener that provides set of events in ChannelIO

removeChannelPluginListener (Deprecated)

Remove listener from ChannelIO

track

Track an event. This method can be used various way such as tracking a page where the guest comes from.

public static void track(String eventName, Map<String, Object> eventProperty)
parametertypedescription
contextContextContext object
eventNameStringname of event, its length should be less than 30
eventPropertyMap<String, Object>A map that you want to store with this event

initPushToken

Set device token for receiving ChannelIO FCM push notification.

public static void initPushToken(String token)

isChannelPushNotification

Return true if a push notification message is for ChannelIO

public static boolean isChannelPushNotification(Map<String, String> message)
parametertypedescription
messageMapMap object represents push notification data

handlePushNotification

Handle notification for showing a chat when the application was launched by tapping ChannelIO notification.

public static handlePushNotification(Activity activity)
parametertypedescription
contextContextContext object

showPushNotification

Show the ChannelIO notification with the contents of the received message.

public static void showPushNotification(Context context, Map<String, String> message)
parametertypedescription
contextContextContext object
messageMapMap object represents push notification data

updateProfile

Update guest profile manually

public static void updateProfile(Map<String, Object> profileMap)