Interface IMLibExtensionModule
-
- All Implemented Interfaces:
-
java.io.Serializable
public interface IMLibExtensionModule implements Serializable
For usage instructions, please refer to remoteControl or moment
-
-
Method Summary
Modifier and Type Method Description abstract void
onCreate(Context context, String appKey)
The module can be initialized here abstract void
onLogin(String userId, String token)
Called after connect succeeds. abstract boolean
onReceiveMessage(Message message, int left, boolean offline, int cmdLeft)
Call this method only when receiving a new message type added by this module abstract List<Class<out MessageContent>>
getMessageContentList()
Returns all new message types added by this module, including signaling messages. abstract List<Class<out MessageContent>>
getCmdMessageContentList()
Returns all signaling messages added by this module abstract void
onConnectStatusChanged(IRongCoreListener.ConnectionStatusListener.ConnectionStatus status)
This method is called when the connection status changes. abstract void
onLogout()
Callback triggered when the client actively calls the logout method abstract void
onDisconnect()
Callback triggered when the client actively calls the disconnect method abstract void
onDestroy()
abstract boolean
onRequestHardwareResource(ResourceType resourceType)
Request hardware resources abstract void
onServiceConnected(Context context, IHandler stub, IRongCoreListener.OnReceiveMessageListener listener)
Callback triggered when the AIDL service connection is successfully established. -
-
Method Detail
-
onCreate
abstract void onCreate(Context context, String appKey)
The module can be initialized here
- Parameters:
context
- The contextappKey
- App key
-
onLogin
abstract void onLogin(String userId, String token)
Called after connect succeeds.
- Parameters:
userId
- The user ID.token
- The authentication token.
-
onReceiveMessage
abstract boolean onReceiveMessage(Message message, int left, boolean offline, int cmdLeft)
Call this method only when receiving a new message type added by this module
- Parameters:
message
- The messageleft
- The remaining count of offline messagesoffline
- Whether in offline statuscmdLeft
- The remaining count of command messages- Returns:
Whether the message has been processed by other modules
-
getMessageContentList
abstract List<Class<out MessageContent>> getMessageContentList()
Returns all new message types added by this module, including signaling messages.
- Returns:
All new message types added by this module, including signaling messages.
-
getCmdMessageContentList
abstract List<Class<out MessageContent>> getCmdMessageContentList()
Returns all signaling messages added by this module
- Returns:
All signaling messages added by this module
-
onConnectStatusChanged
abstract void onConnectStatusChanged(IRongCoreListener.ConnectionStatusListener.ConnectionStatus status)
This method is called when the connection status changes.
- Parameters:
status
- The connection status
-
onLogout
abstract void onLogout()
Callback triggered when the client actively calls the logout method
-
onDisconnect
abstract void onDisconnect()
Callback triggered when the client actively calls the disconnect method
-
onDestroy
abstract void onDestroy()
-
onRequestHardwareResource
abstract boolean onRequestHardwareResource(ResourceType resourceType)
Request hardware resources
- Parameters:
resourceType
- The type of hardware resource- Returns:
Indicates whether the resource was successfully obtained
-
onServiceConnected
abstract void onServiceConnected(Context context, IHandler stub, IRongCoreListener.OnReceiveMessageListener listener)
Callback triggered when the AIDL service connection is successfully established.
- Parameters:
listener
- The message listener set by the kit
-
-
-
-