Agora Java API Reference for Android
|
Public Member Functions | |
default void | onLinkStateEvent (LinkStateEvent event) |
default void | onMessageEvent (MessageEvent event) |
default void | onPresenceEvent (PresenceEvent event) |
default void | onTopicEvent (TopicEvent event) |
default void | onLockEvent (LockEvent event) |
default void | onStorageEvent (StorageEvent event) |
default void | onConnectionStateChanged (String channelName, RtmConnectionState state, RtmConnectionChangeReason reason) |
default void | onTokenPrivilegeWillExpire (String channelName) |
The RtmEventListener class.
The SDK uses this class to send callback event notifications to the app, and the app inherits the methods in this class to retrieve these event notifications.
All methods in this class have their default (empty) implementations, and the app can inherit only some of the required events instead of all. In the callback methods, the app should avoid time-consuming tasks or calling blocking APIs, otherwise the SDK may not work properly.
default void io.agora.rtm.RtmEventListener.onLinkStateEvent | ( | LinkStateEvent | event | ) |
Occurs when link state change
event | details of link state event |
default void io.agora.rtm.RtmEventListener.onMessageEvent | ( | MessageEvent | event | ) |
Occurs when receive a message.
event | details of message event. |
default void io.agora.rtm.RtmEventListener.onPresenceEvent | ( | PresenceEvent | event | ) |
Occurs when remote user presence changed
event | details of presence event. |
default void io.agora.rtm.RtmEventListener.onTopicEvent | ( | TopicEvent | event | ) |
Occurs when remote user join/leave topic or when user first join this channel, got snapshot of topics in this channel
event | details of topic event. |
default void io.agora.rtm.RtmEventListener.onLockEvent | ( | LockEvent | event | ) |
Occurs when lock state changed
event | details of lock event. |
default void io.agora.rtm.RtmEventListener.onStorageEvent | ( | StorageEvent | event | ) |
Occurs when receive storage event
event | details of storage event. |
default void io.agora.rtm.RtmEventListener.onConnectionStateChanged | ( | String | channelName, |
RtmConnectionState | state, | ||
RtmConnectionChangeReason | reason | ||
) |
Occurs when the connection state changes between rtm sdk and agora server.
channelName | The Name of the channel. |
state | The new connection state. |
reason | The reason for the connection state change. |
default void io.agora.rtm.RtmEventListener.onTokenPrivilegeWillExpire | ( | String | channelName | ) |
Occurs when token will expire in 30 seconds.
channelName | The name of the channel. |