AgoraRtmClient class

Properties

hashCode int
The hash code for this object.
read-only, inherited
onConnectionStateChanged ↔ void Function(int state, int reason)
Occurs when the connection state between the SDK and the Agora RTM system changes.
read / write
onError ↔ void Function()
Occurs when you receive error events.
read / write
onFileMessageReceived ↔ void Function(AgoraRtmFileMessage message, String peerId)
Occurs when receiving a channel file message.
read / write
onImageMessageReceived ↔ void Function(AgoraRtmImageMessage message, String peerId)
Occurs when receiving a channel image message.
read / write
onLocalInvitationAccepted ↔ void Function(AgoraRtmLocalInvitation invite)
Callback to the caller: occurs when the caller accepts the call invitation.
read / write
onLocalInvitationCanceled ↔ void Function(AgoraRtmLocalInvitation invite)
Callback to the caller: occurs when the caller cancels a call invitation.
read / write
onLocalInvitationFailure ↔ void Function(AgoraRtmLocalInvitation invite, int errorCode)
Callback to the caller: occurs when the life cycle of the outgoing call invitation ends in failure.
read / write
onLocalInvitationReceivedByPeer ↔ void Function(AgoraRtmLocalInvitation invite)
Callback to the caller: occurs when the caller receives the call invitation.
read / write
onLocalInvitationRefused ↔ void Function(AgoraRtmLocalInvitation invite)
Callback to the caller: occurs when the caller declines the call invitation.
read / write
onMediaDownloadingProgress ↔ void Function(int currentSize, int totalSize, int requestId)
Occurs when channel media downloading progress changed.
read / write
onMediaUploadingProgress ↔ void Function(int currentSize, int totalSize, int requestId)
Occurs when channel media uploading progress changed.
read / write
onMessageReceived ↔ void Function(AgoraRtmMessage message, String peerId)
Occurs when the local user receives a peer-to-peer message.
read / write
onRemoteInvitationAccepted ↔ void Function(AgoraRtmRemoteInvitation invite)
Callback to the caller: occurs when the callee accepts the call invitation.
read / write
onRemoteInvitationCanceled ↔ void Function(AgoraRtmRemoteInvitation invite)
Callback to the caller: occurs when the caller cancels a call invitation.
read / write
onRemoteInvitationFailure ↔ void Function(AgoraRtmRemoteInvitation invite, int errorCode)
Callback to the caller: occurs when the life cycle of the outgoing call invitation ends in failure.
read / write
onRemoteInvitationReceivedByPeer ↔ void Function(AgoraRtmRemoteInvitation invite)
Callback to the caller: occurs when the callee receives the call invitation.
read / write
onRemoteInvitationRefused ↔ void Function(AgoraRtmRemoteInvitation invite)
Callback to the caller: occurs when the callee declines the call invitation.
read / write
onTokenExpired ↔ void Function()
Occurs when your token expires.
read / write
runtimeType Type
A representation of the runtime type of the object.
read-only, inherited

Methods

acceptRemoteInvitation(Map arguments) Future<void>
Allows the callee to accept a call invitation.
addOrUpdateChannelAttributes(String channelId, List<AgoraRtmChannelAttribute> attributes, bool enableNotificationToChannelMembers) Future<void>
Adds or updates the channel's attribute(s).
addOrUpdateLocalUserAttributes(List<Map<String, String>> attributes) Future<void>
Adds or updates the local user’s attribute(s).
cancelLocalInvitation(Map arguments) Future<void>
Allows the caller to cancel a call invitation.
clearChannelAttributes(String channelId, bool enableNotificationToChannelMembers) Future<void>
Clears all attributes of the channel.
clearLocalUserAttributes() Future<void>
Clears all attributes of the local user.
createChannel(String channelId) Future<AgoraRtmChannel>
Creates an AgoraRtmChannel.
deleteChannelAttributesByKeys(String channelId, List<String> keys, bool enableNotificationToChannelMembers) Future<void>
Deletes the channel's attributes using attribute keys.
deleteLocalUserAttributesByKeys(List<String> keys) Future<void>
Deletes the local user’s attributes using attribute keys.
destroy() Future<void>
Destroy and stop event to the client with related channels.
getChannelAttributes(String channelId) Future<List<AgoraRtmChannelAttribute>>
Gets all attributes of a specified channel.
getChannelAttributesByKeys(String channelId, List<String> keys) Future<List<AgoraRtmChannelAttribute>>
Gets the attributes of a specified channel using attribute keys.
getUserAttributes(String userId) Future<Map<String, dynamic>>
Gets all attributes of a specified user.
getUserAttributesByKeys(String userId, List<String> keys) Future<Map<String, dynamic>>
Gets the attributes of a specified user using attribute keys.
login(String token, String userId) Future
Allows a user to log in the Agora RTM system.
logout() Future
Allows a user to log out of the Agora RTM system.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a non-existent method or property is accessed.
inherited
queryPeersOnlineStatus(List<String> peerIds) Future<Map<String, dynamic>>
Queries the online status of the specified user(s).
refuseRemoteInvitation(Map arguments) Future<void>
Allows the callee to decline a call invitation.
releaseChannel(String channelId) Future<void>
Releases an AgoraRtmChannel.
renewToken(String token) Future
Renews the token.
sendImageMessageToPeer(String peerId, AgoraRtmMessage message, [bool offline, bool historical]) Future<void>
Allows a user to send a peer-to-peer message to a specific peer user.
sendLocalInvitation(Map arguments) Future<void>
Allows the caller to send a call invitation to the callee.
sendMessageToPeer(String peerId, AgoraRtmMessage message, [bool offline, bool historical]) Future<void>
Allows a user to send a peer-to-peer message to a specific peer user.
setChannelAttributes(String channelId, List<AgoraRtmChannelAttribute> attributes, bool enableNotificationToChannelMembers) Future<void>
Substitutes the channel attributes with new ones.
setLocalUserAttributes(List<Map<String, String>> attributes) Future<void>
Substitutes the local user’s attributes with new ones.
setLog(int level, int size, String path) Future
Allows a user set log
toString() String
A string representation of this object.
inherited

Operators

operator ==(Object other) bool
The equality operator.
inherited

Static Methods

createInstance(String appId) Future<AgoraRtmClient>
Initializes an AgoraRtmClient instance
getSdkVersion() Future<String>
get the agora native sdk version