Interface IExtensionModule

    • 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 onInit(Context context, String appKey) SDK initialization.
      abstract void onAttachedToExtension(Fragment fragment, RongExtension extension) After entering a conversation, Extension loads all registered modules.
      abstract void onDetachedFromExtension() Called when leaving a conversation; Extension releases all loaded modules.
      abstract void onReceivedMessage(Message message) After the SDK receives a message, it routes the message to the corresponding module via this method.
      abstract List<IPluginModule> getPluginModules(ChannelType channelType) Users can configure plugins in the "+" area based on different conversations.
      abstract List<IEmoticonTab> getEmoticonTabs() Multiple or single emoticon tabs can be configured in a conversation.
      abstract void onDisconnect() SDK disconnected.
      • Methods inherited from class java.lang.Object

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

    • Method Detail

      • onInit

         abstract void onInit(Context context, String appKey)

        SDK initialization. Users can register custom messages, message templates, and initialize their own modules in this method.

        Parameters:
        context - Context.
        appKey - Unique application key.
      • onAttachedToExtension

         abstract void onAttachedToExtension(Fragment fragment, RongExtension extension)

        After entering a conversation, Extension loads all registered modules. Modules can hold and use the Extension. Note: if a module holds an Extension object, it must release it in the onDetachedFromExtension callback to avoid memory leaks.

        Parameters:
        fragment - The fragment where the Extension object resides.
        extension - The Extension object.
      • onDetachedFromExtension

         abstract void onDetachedFromExtension()

        Called when leaving a conversation; Extension releases all loaded modules. Note: if a module holds an Extension object, it must release it in this callback to avoid memory leaks.

      • onReceivedMessage

         abstract void onReceivedMessage(Message message)

        After the SDK receives a message, it routes the message to the corresponding module via this method. Users can selectively handle received messages based on their registered message types.

        Parameters:
        message - The message entity.
      • getPluginModules

         abstract List<IPluginModule> getPluginModules(ChannelType channelType)

        Users can configure plugins in the "+" area based on different conversations. One or multiple plugins can be configured; the extension displays all returned plugins. Note: if no plugins are configured, this method does not need to be implemented.

        Parameters:
        channelType - Channel type.
        Returns:

        Plugin list.

      • getEmoticonTabs

         abstract List<IEmoticonTab> getEmoticonTabs()

        Multiple or single emoticon tabs can be configured in a conversation. Once configured, this tab will be displayed in all conversations. Note: if no emoticons are configured, this method does not need to be implemented.

        Returns:

        Emoticon tab list.

      • onDisconnect

         abstract void onDisconnect()

        SDK disconnected.