This page describes ChannelIO of the Channel Talk React Native SDK (hereafter refer to SDK).)
Loads the information needed to use the SDK. After a successful boot, you are ready to use the features of SDK. See boot for details.
Parameter | required | Description |
|---|---|---|
bootConfig | O | A boot configuration. You can set the plugin key and position of Channel button, etc. |
bootCallback | X | A callback from |
Disable all functions except receiving system push notifications and track.
Terminate connection between SDK and Channel. shutdown will discontinue features of the SDK will be discontinued.
Displays Channel button on the global screen.
Hide Channel button on the global screen.
Shows the messenger.
Hides the messenger.
Opens a Chat. You can open a new one or open an existing chat.
Parameter | required | description |
|---|---|---|
chatId | X | The id of chat.If chatId is invalid or nil, it will open a newly created chat. |
message | X | A filled message on the message input box.It will be valid when chatId is nil. |
Opens a user chat and starts the specified workflow.
If a corresponded workflow with the provided
workflowIdis exists, it will be executed. ifworkflowIdis invalid, an error page is displayed.If you don't pass
workflowId, no action is taken.
parameter | type | required | description |
|---|---|---|---|
workflowId | String? | X | The ID of workflow to start with.An error page will be shown if such workflow does not exist. |
Track the user’s event. See event tracking for more details.
Paramter | Description |
|---|---|
eventName | Event name max length is 64 |
properties | **optional** Event properties. |
Updates user information.
Parameter | required | description |
|---|---|---|
userData | O | Information of the user to be updated. |
callback | X | Callback for the updated user information. |
Add tags to the user.
Previous user's tag | Parameter | Result |
|---|---|---|
["a"]["a"] | ["b"]["b"] | ["a", "b"]["a", "b"] |
null | ["a", "b"]["a", "b"] | ["a", "b"]["a", "b"] |
["a", "c"]["a", "c"] | ["a", "b"]["a", "b"] | ["a", "b", "c"]["a", "b", "c"] |
["a", "b", "c", "d", "e", "f", "g"]["a", "b", "c", "d", "e", "f", "g"] | ["g", "h", "i", "j"]["g", "h", "i", "j"] | ["a", "b", "c", "d", "e", "f", "g", "h", "i", "j"]["a", "b", "c", "d", "e", "f", "g", "h", "i", "j"] |
["a", "b", "c", "d", "e", "f", "g"]["a", "b", "c", "d", "e", "f", "g"] | ["g", "h", "i", "j", "k"]["g", "h", "i", "j", "k"] | error:combined size is 11 |
Parameter | required | description |
|---|---|---|
tags | O | Tags to add. • The maximum length is 10. • Tag cannot be duplicated. • Tag is case-insensitive (Tags are renamed to the lower-case.) • nil, list including nil, empty list, and an empty string is not allowed. |
callback | X | A Callback when the update completes. It returns an error when it fails to add. |
Remove tags from the user. It Ignores if tags do not exist.
Previous user's tag | Parameter | Result |
|---|---|---|
["a", "b"]["a", "b"] | ["a"]["a"] | ["b"]["b"] |
["a"]["a"] | ["c"]["c"] | ["a"]["a"] |
["a"]["a"] | ["A", "c"]["A", "c"] | null |
Parameter | required | description |
|---|---|---|
tags | O | Tags to be deleted. nil or empty strings or lists containing them are not allowed. |
callback | X | A Callback when the remote tag completes. It returns an error when it fails to remove. |
Sets the name of the screen along with user chat profile. If track is called before setPage, the event will not reflect the page information.
Parameter | type | required | description |
|---|---|---|---|
page |
| X | This is the screen name when track is called. When calling `.setPage(null)`, the event's page is set to `null`. |
profile |
| X | The user chat profile value. - When nil is assigned to a specific field within the profile object, only the value of that field is cleared. - The user chat profile value is applied when a user chat is created. |
Resets the name of the screen when track is called. The default value is the name of the ViewController or Activity calling the track.
Hides the Channel Popup on the global screen.
Notifies the change of the device token to Channel Talk.
Parameter | Description |
|---|---|
token | Push token |
Checks if the push payload is targeting on Channel Talk SDK.
Parameter | Description |
|---|---|
payload |
Notifies an event that the user has received the push notification.
+ Android Show push notification
Parameter | Description | Etc. |
|---|---|---|
payload |
Checks if the plugin has unhandled push notification. See push notifications for details.
Parameter | Description | Etc. |
|---|---|---|
activity | Base activity to start chat | Android only |
Open chat according to the push data stored by receivePushNotifcation .
Parameter | Description | Etc. |
|---|---|---|
activity | Base activity to start chat | Android only |
Checks that the SDK is in the boot status.
Sets SDK’s debug mode. If it sets true, SDK prints log messages in the console.
Parameter | Description |
|---|---|
flag | Debug flag |
Sets the appearance of the SDK.
Parameter | Type | Required | Description |
|---|---|---|---|
appearance | O | If you specify"light"and"dark",fix the theme with its properties.If"system",follow the device's system theme.default value is"system". |