Create Channel

You need to create a channel in order to chat.

  • targetId can be retrieved by calling getUserId method provided by HiveTalkPlusUser object
  • You can enter up to 5 keyvalue pairs in data field. The maximum allowed length of key is 128 characters and the maximum allowed length of value is 1024 characters.
  • Supported channel types are follows: private, public, invitationOnly, broadcast, super_public and super_private.
  • type field is required.
  • For invitationOnly channel, invitationCode field is also required.
Type Value Can Join Channel FCM Support
PRIVATE private X O
PUBLIC public O O
INVITATION ONLY invitationOnly O (need Invitation Code) O
BROADCAST broadcast O O
SUPER_PUBLIC super_public O X
SUPER_PRIVATE super_private O X
  • For private channel, you can choose to reuse existing channel by setting reuseChannel parameter to true. This only works if channelId and targetIds match those of already existing channel that you wish to reuse.
  • Anyone who is not banned is allowed to join a public channel.
  • Only users with valid invitationCode can join an invitationOnly channel.
  • For broadcast channel:
    • When the channel owner sends a message, the message is sent to all channel members.
    • When a channel member other than the channel owner sends a message, the message is sent only to the channel owner.
  • For super_private and super_public channel:
    • You can set the maximum number of members above 100.
    • Unlike other channel types that populate members and bannedUsers fields,
    • super channels return empty members and bannedUsers fields
    • FCM Push Notification is not supported
Unity

Android

iOS

 


Viewing Channel

You can view any public channel or a channel you’ve joined by providing a matching channel ID.

Unity

Android

iOS

 


Updating Channel

Channel owner can update channel information.

Unity

Android

iOS

 


View Channels List

1. View All Public Channels

You can view all public channels even if you are a not member.
The list is paginated so you can use the last HiveTalkPlusChannel from the previous list to fetch the next page.

Unity

Android

iOS

2. View Joined Channels

You can view channels you’ve joined. The list is paginated so you can use the last HiveTalkPlusChannel from the previous list to fetch the next page.

Unity

Android

iOS

3. View Hidden Channels

You can retrieve a list of channels that were hidden when user called hideChannel function.

Unity

Android

iOS

4. Get Total Unread Message Count

You can view the total number of unread messages from joined channels.

Unity

Android

iOS

5. Mark All Channels As Read

You can mark as read all unread messages from joined channels.

Unity

Android

iOS

 


Manage Channel Members

1. Invite Users

You can invite users as channel members. Invitation feature is available to channel owner and members.

Unity

Android

iOS

2. Remove Members

As channel owner, you can remove members from a channel.

Unity

Android

iOS

3. Block Users

As channel owner, you can block users in your channel. Blocked users are immediately removed from the channel and cannot join the channel until you unblock them.

Unity

Android

iOS

4. Unblock Users

As channel owner, you can unblock users who had been blocked from your channel.

Unity

Android

iOS

5. Mute Members

Mute feature allows you to mute specific members in your channel. Muted members are not allowed to send messages. This feature is available only to the channel owner.

Unity

Android

iOS

6. Unmute Members

Remove mute state from specific members. This feature is available only to the channel owner.

Unity

Android

iOS

 


Join / Leave Channel

1. Join Channel

Anyone can join a public channel even without invitation from the owner.

Unity

Android

iOS

2. Join InvitationOnly Channel

In order to join an invitationOnly channel, you need to know the channel’s invitation code.

Unity

Android

iOS

3. Leave Channel

If you are the last remaining channel member and you set deleteChannelIfEmpty parameter to true when leaving the channel, the channel will be deleted as soon as you leave.

Unity

Android

iOS

 


Messaging

1. View Messages

You can view messages from a channel ordered by the most recent sent date.

Unity

Android

iOS

2. View Only Messages With File Attachment

You can messages with file attachment from a channel ordered by the most recent sent date.

Unity

Android

iOS

3. Send Message

You can send a message in a channel. The following message types are supported: text, hidden, custom and admin.

  • Push notification is not sent for hidden message type.
  • admin message type can only be sent from TalkPlus dashboard or by calling REST API.
  • You can enter up to 5 keyvalue pairs in data field. The maximum allowed length of key is 128 characters and the maximum allowed length of value is 1024 characters.
  • Both message text and data cannot be empty when sending a message.
  • The maximum allowed length of message text is 8192 characters.
Type Value
TEXT TYPE_TEXT
HIDDEN TYPE_HIDDEN
CUSTOM TYPE_CUSTOM
ADMIN TYPE_ADMIN
Unity

Android

iOS

4. Mark As Read

You can mark a channel as read. (You need to call this when appropriate if you want to use unread message count feature)

Unity

Android

iOS

5. Get Unread Message Count

You can find out how many members have not read a particular message.

Unity

Android

iOS

 


Hide / Show Channel

1. Hide Channel

You can hide a channel so that it does not appear in the list of currently joined channels.

Unity

Android

iOS

2. Show Channel

You can unhide a channel so that it appears in the list of currently joined channels.

Unity

Android

iOS

 


Freeze / Unfreeze Channel

1. Freeze Channel

Freezing a channel stops all channel members (with the exception of channel owner) from sending messages.

Unity

Android

iOS

2. Unfreeze Channel

Unfreeze a channel so that all channel members can send messages.

Unity

Android

iOS

 


Transfer Channel Ownership

Channel owners can transfer channel ownership to another channel member.

Unity

Android

iOS

 


Event

You can handle events as follows:

Unity

Android

iOS