Package io.rong.imlib

Interface IMLibExtensionModule

  • All Implemented Interfaces:
    java.io.Serializable

    
    public interface IMLibExtensionModule
     implements Serializable
                        

    使用方法,请参考 remoteControl 或者 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
    • Constructor Detail

    • Method Detail

      • onCreate

         abstract void onCreate(Context context, String appKey)

        模块可在此进行初始化

        Parameters:
        context - 上下文
        appKey - App key
      • onLogin

         abstract void onLogin(String userId, String token)

        connect成功之后,调用

        Parameters:
        userId - 用户 id
        token - token
      • onReceiveMessage

         abstract boolean onReceiveMessage(Message message, int left, boolean offline, int cmdLeft)

        仅当收到本模块新增的消息类型时,调用此方法

        Parameters:
        message - 消息
        left - 离线消息剩余数
        offline - 是否离线状态
        cmdLeft - 命令消息剩余数
        Returns:

        是否被其他模块处理

      • getMessageContentList

         abstract List<Class<out MessageContent>> getMessageContentList()

        返回本 module 新增的所有的消息类型,包括信令消息

        Returns:

        本 module 新增的所有的消息类型,包括信令消息

      • getCmdMessageContentList

         abstract List<Class<out MessageContent>> getCmdMessageContentList()

        返回本 module 新增的所有信令消息

        Returns:

        本 module 新增的所有信令消息

      • onLogout

         abstract void onLogout()

        客户端主动调用 logout 方法时回调此方法

      • onDisconnect

         abstract void onDisconnect()

        客户端主动调用 disconnect 方法时回调此方法

      • onRequestHardwareResource

         abstract boolean onRequestHardwareResource(ResourceType resourceType)

        请求硬件资源

        Parameters:
        resourceType - 硬件资源类型
        Returns:

        是否正常获取