Chat Android SDK
5.1.0
|
Provides access to channels collection, allows to create new channels. More...
Classes | |
class | ChannelBuilder |
Helper to create new channel with provided data. More... | |
enum | SortCriterion |
Sorting criterion for channel query operation. More... | |
enum | SortOrder |
Sorting order for channel query operation. More... | |
Public Member Functions | |
Actions | |
void | createChannel (String friendlyName,@NonNull ChannelType type, CallbackListener< Channel > listener) |
Create a channel with friendly name and type. More... | |
Builders | |
ChannelBuilder | channelBuilder () |
Get ChannelBuilder to create channel with options. More... | |
Getters | |
void | getChannel (String channelSidOrUniqueName, CallbackListener< Channel > listener) |
Retrieves a channel with the specified SID or unique name. More... | |
void | getPublicChannelsList (CallbackListener< Paginator< ChannelDescriptor >> listener) |
Request list of public channels user have not joined. More... | |
void | getUserChannelsList (CallbackListener< Paginator< ChannelDescriptor >> listener) |
Request list of channels user have joined. More... | |
native List< Channel > | getSubscribedChannels () |
Request list of user's joined channels. More... | |
native List< Channel > | getSubscribedChannelsSortedBy (SortCriterion criterion, SortOrder order) |
Request list of user's joined channels sorted in particular order. More... | |
native List< Member > | getMembersByIdentity (String identity) |
Get list of all Channel members with a given identity. More... | |
Provides access to channels collection, allows to create new channels.
ChannelBuilder com.twilio.chat.Channels.channelBuilder | ( | ) |
Get ChannelBuilder to create channel with options.
A pattern to build channel with options is:
void com.twilio.chat.Channels.createChannel | ( | String | friendlyName, |
@NonNull ChannelType | type, | ||
CallbackListener< Channel > | listener | ||
) |
Create a channel with friendly name and type.
This operation creates a new channel entity on the backend.
friendlyName | Friendly name of the new channel. |
type | Channel type |
listener | Listener that receives the status of create channel action. |
void com.twilio.chat.Channels.getChannel | ( | String | channelSidOrUniqueName, |
CallbackListener< Channel > | listener | ||
) |
Retrieves a channel with the specified SID or unique name.
channelSidOrUniqueName | Identifier for the channel. |
listener | Listener to receive the channel. |
native List<Member> com.twilio.chat.Channels.getMembersByIdentity | ( | String | identity | ) |
void com.twilio.chat.Channels.getPublicChannelsList | ( | CallbackListener< Paginator< ChannelDescriptor >> | listener | ) |
Request list of public channels user have not joined.
This command will return a list of ChannelDescriptors. These are the channels that are public and are not joined by current user. To get channels already joined by current user see getUserChannelsList.
Returned list is wrapped in a pagination interface.
listener | Listener to receive a paginator with first page of results. Use paginator interface to request subsequent pages. |
native List<Channel> com.twilio.chat.Channels.getSubscribedChannels | ( | ) |
Request list of user's joined channels.
native List<Channel> com.twilio.chat.Channels.getSubscribedChannelsSortedBy | ( | SortCriterion | criterion, |
SortOrder | order | ||
) |
Request list of user's joined channels sorted in particular order.
criterion | Field to sort on. |
order | Sorting order. |
void com.twilio.chat.Channels.getUserChannelsList | ( | CallbackListener< Paginator< ChannelDescriptor >> | listener | ) |
Request list of channels user have joined.
This command will return a list of ChannelDescriptors. These are the channels that are joined by current user, regardless of if they are public or private. To get public channels not yet joined by current user see getPublicChannelsList.
Returned list is wrapped in a pagination interface.
listener | Listener to receive a paginator with first page of results. Use paginator interface to request subsequent pages. |