Package io.rong.imlib

Interface IMLibExtensionModule

  • All Implemented Interfaces:
    java.io.Serializable

    
    public interface IMLibExtensionModule
     implements Serializable
                        

    For usage instructions, please refer to remoteControl or moment

    • Nested Class Summary

      Nested Classes 
      Modifier and Type Class Description
    • Field Summary

      Fields 
      Modifier and Type Field Description
    • Constructor Summary

      Constructors 
      Constructor Description
    • Enum Constant Summary

      Enum Constants 
      Enum Constant Description
    • 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.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

    • Method Detail

      • onCreate

         abstract void onCreate(Context context, String appKey)

        The module can be initialized here

        Parameters:
        context - The context
        appKey - 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 message
        left - The remaining count of offline messages
        offline - Whether in offline status
        cmdLeft - 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

      • 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

      • onRequestHardwareResource

         abstract boolean onRequestHardwareResource(ResourceType resourceType)

        Request hardware resources

        Parameters:
        resourceType - The type of hardware resource
        Returns:

        Indicates whether the resource was successfully obtained