Interface IMLibExtensionModule
-
- All Implemented Interfaces:
-
java.io.Serializable
public interface IMLibExtensionModule implements SerializableFor usage instructions, please refer to remoteControl or moment
-
-
Method Summary
Modifier and Type Method Description abstract voidonCreate(Context context, String appKey)The module can be initialized here abstract voidonLogin(String userId, String token)Called after connect succeeds. abstract booleanonReceiveMessage(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 voidonConnectStatusChanged(IRongCoreListener.ConnectionStatusListener.ConnectionStatus status)This method is called when the connection status changes. abstract voidonLogout()Callback triggered when the client actively calls the logout method abstract voidonDisconnect()Callback triggered when the client actively calls the disconnect method abstract voidonDestroy()abstract booleanonRequestHardwareResource(ResourceType resourceType)Request hardware resources abstract voidonServiceConnected(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
-
-
-
-