How I add/Bind the custom channel into chat UI

Hi,
I am recently able to integrate a chat UIKit into our application, which is running fine.
Now there is a requirement that only those channel with specific custom_type should be loaded into the chat window,

I am able to get the custom channel list but unable to bind/assign that channel to chat kit.
Any sample code or API sample would be highly welcomed.

Thanks

Hi, @tahiralvi
If you already got the channel instance, you can use the channel Activity or the channel Fragment in the UIKit using the channel instance.

  • Call ChannelActivity
Intent intent = ChannelActivity.newIntent(context, **YOUR_CHANNEL_URL**);
startActivity(intent);
  • Call ChannelFragment via ChannelFragment.Builder
ChannelFragment Fragment = new ChannelFragment.Builder(**YOUR_CHANNEL_URL**)
    .setCustomChannelFragment(new CustomChannelFragment())
    .setUseHeader(true)
    .setUseHeaderLeftButton(true)
    .setUseHeaderRightButton(true)
    .setUseLastSeenAt(true)
    .setUseTypingIndicator(true)
    .setHeaderLeftButtonIconResId(R.drawable.icon_arrow_left)
    .setHeaderRightButtonIconResId(R.drawable.icon_info)
    .setInputLeftButtonIconResId(R.drawable.icon_add)
    .setInputRightButtonIconResId(R.drawable.icon_send)
    .setInputHint("Type here")
    .setHeaderLeftButtonListener(leftButtonListener)
    .setHeaderRightButtonListener(rightButtonListener)
    .setMessageListAdapter(adapter)
    .setItemClickListener(itemClickListener)
    .setItemLongClickListener(itemLongClickListener)
    .setInputLeftButtonListener(inputLeftButtonListener)
    .setMessageListParams(params)
    .setEmojiReactionClickListener(emojiReactionClickListener)
    .setEmojiReactionLongClickListener(emojiReactionLongClickListener)
    .setEmojiReactionMoreButtonClickListener(emojiReactionMoreButtonClickListener)
    .build();

See here for more sample code.

1 Like

Hi @LeoShin
Thanks for your prompt reply.

I am using the Javascript based UI kit, it would be great if you could share any code which will work in JavaScript based UI kits.

If you want to use JS uikit. how about refer to this? it will be helpful for you

Thanks @LeoShin

The link provides you is about the group Channel, I want to get Open Channel list filter by custom_type. and then want to assign it to chat.

Hi, @tahiralvi Unfortunately, Sendbird UIKit doesnโ€™t support OpenChannel yet. :disappointed:

1 Like

Hi @LeoShin

Thanks for informing me. It should be there but okay.
:zipper_mouth_face: