Public Member Functions

void onMessageReceived (RtmMessage message, RtmChannelMember fromMember)
 
void onMemberJoined (RtmChannelMember member)
 
void onMemberLeft (RtmChannelMember member)
 

Detailed Description

Callbacks for the Agora RTM channel methods.

Member Function Documentation

◆ onMessageReceived()

void io.agora.rtm.RtmChannelListener.onMessageReceived ( RtmMessage  message,
RtmChannelMember  fromMember 
)

Occurs when the local user receives a channel message.

When a remote channel member calls the sendMessage method and successfully sends out a channel message, the local user receives this callback.

Parameters
messageThe received channel message. See RtmMessage.
fromMemberThe message sender. See RtmChannelMember.

◆ onMemberJoined()

void io.agora.rtm.RtmChannelListener.onMemberJoined ( RtmChannelMember  member)

Occurs when a remote user joins the channel.

When a remote user calls the join method and successfully joins the channel, the local user receives this callback.

Note This callback is disabled when the number of the channel members exceeds 512.

Parameters
memberThe user joining the channel. See RtmChannelMember.

◆ onMemberLeft()

void io.agora.rtm.RtmChannelListener.onMemberLeft ( RtmChannelMember  member)

Occurs when a remote channel member leaves the channel.

When a remote channel member calls the leave method and successfully leaves the channel, the local user receives this callback.

Note This callback is disabled when the number of the channel members exceeds 512.

Parameters
memberThe channel member that leaves the channel. See RtmChannelMember.