Public Member Functions | |
void | onConnectionStateChanged (int state, int reason) |
void | onMessageReceived (RtmMessage message, String peerId) |
void | onImageMessageReceivedFromPeer (RtmImageMessage message, String peerId) |
void | onFileMessageReceivedFromPeer (RtmFileMessage message, String peerId) |
void | onMediaUploadingProgress (RtmMediaOperationProgress progress, long requestId) |
void | onMediaDownloadingProgress (RtmMediaOperationProgress progress, long requestId) |
void | onTokenExpired () |
void | onPeersOnlineStatusChanged (Map< String, Integer > peersStatus) |
Callbacks for the Agora RTM client methods.
void io.agora.rtm.RtmClientListener.onConnectionStateChanged | ( | int | state, |
int | reason | ||
) |
Occurs when the connection state between the SDK and the Agora RTM system changes.
state | The new connection state. See ConnectionState. |
reason | The reason for the connection state change. See ConnectionChangeReason. |
void io.agora.rtm.RtmClientListener.onMessageReceived | ( | RtmMessage | message, |
String | peerId | ||
) |
Occurs when the local user receives a peer-to-peer message.
message | The received message. See RtmMessage. |
peerId | The user ID of the message sender. |
void io.agora.rtm.RtmClientListener.onImageMessageReceivedFromPeer | ( | RtmImageMessage | message, |
String | peerId | ||
) |
Occurs when the local user receives a peer-to-peer image message.
message | The received image message. See RtmImageMessage. |
peerId | The user ID of the message sender. |
void io.agora.rtm.RtmClientListener.onFileMessageReceivedFromPeer | ( | RtmFileMessage | message, |
String | peerId | ||
) |
Occurs when the local user receives a peer-to-peer file message.
message | The received file message. See RtmFileMessage. |
peerId | The user ID of the message sender. |
void io.agora.rtm.RtmClientListener.onMediaUploadingProgress | ( | RtmMediaOperationProgress | progress, |
long | requestId | ||
) |
Active callback: Reports the upload progress.
progress | Upload progress of a file or image. See RtmMediaOperationProgress. |
requestId | Unique ID for the upload request. |
void io.agora.rtm.RtmClientListener.onMediaDownloadingProgress | ( | RtmMediaOperationProgress | progress, |
long | requestId | ||
) |
Active callback: Reports the download progress.
progress | Download progress of a file or image. See RtmMediaOperationProgress. |
requestId | Unique ID for the download request. |
void io.agora.rtm.RtmClientListener.onTokenExpired | ( | ) |
Occurs when the RTM server detects that the RTM token has exceeded the 24-hour validity period and when the SDK is in the CONNECTION_STATE_RECONNECTING state.
void io.agora.rtm.RtmClientListener.onPeersOnlineStatusChanged | ( | Map< String, Integer > | peersStatus | ) |
Occurs when the online status of the peers, to whom you subscribe, changes.
peersStatus | An array of peers' online states. See PeerOnlineState. |