Chat Android SDK  7.0.1
com.twilio.chat.Channels.ChannelBuilder Class Reference

Helper to create new channel with provided data. More...

Public Member Functions

ChannelBuilder withFriendlyName (String friendlyName)
 Set channel friendly name. More...
 
ChannelBuilder withUniqueName (String uniqueName)
 Set channel unique name. More...
 
ChannelBuilder withType (@NonNull ChannelType type)
 Set channel type - PUBLIC or PRIVATE. More...
 
ChannelBuilder withAttributes (Attributes attributes)
 Set user-specified custom channel attributes. More...
 
void build (CallbackListener< Channel > listener)
 Method to create channel with options. More...
 

Detailed Description

Helper to create new channel with provided data.

Member Function Documentation

void com.twilio.chat.Channels.ChannelBuilder.build ( CallbackListener< Channel listener)

Method to create channel with options.

Set options using withFriendlyName, withUniqueName, withType and withAttributes before calling this function.

Parameters
listenerListener that receives the status of create channel action.
ChannelBuilder com.twilio.chat.Channels.ChannelBuilder.withAttributes ( Attributes  attributes)

Set user-specified custom channel attributes.

Parameters
attributesAttributes object with custom channel attributes.
Returns
Self for chaining.
ChannelBuilder com.twilio.chat.Channels.ChannelBuilder.withFriendlyName ( String  friendlyName)

Set channel friendly name.

Parameters
friendlyNameFriendly name for channel to create.
Returns
Self for chaining.
ChannelBuilder com.twilio.chat.Channels.ChannelBuilder.withType ( @NonNull ChannelType  type)

Set channel type - PUBLIC or PRIVATE.

Parameters
typeNew channel type.
Returns
Self for chaining.
ChannelBuilder com.twilio.chat.Channels.ChannelBuilder.withUniqueName ( String  uniqueName)

Set channel unique name.

Parameters
uniqueNameUser-specified unique name for channel.
Returns
Self for chaining.