Interface ChatParams


public interface ChatParams
Object defining settings strictly associated with ChatRoom objects such
as ephemeral settings and backends.

It is automatically created when you enable chat capabilities in the ConferenceParams
.
If the ChatRoom backend is {@link ChatRoom#Backend#Basic}, then no
other parameter is required, but ChatMessage sent and received won't
benefit from all features a {@link ChatRoom#Backend#FlexisipChat} can offer
like conversation with multiple participants and a subject, end-to-end
encryption, ephemeral messages, etc... but this type is the only one that can
interoperate with other SIP clients or with non-flexisip SIP proxies.
  • Method Summary

    Modifier and Type
    Method
    Description
    int
    activateEphemeral(int lifetime)
    Set lifetime (in seconds) for all new ephemeral messages in the text
    capabilities of the chat.
    int
    activateEphemeral(int lifetime, int notReadLifetime)
    Set lifetime (in seconds) for all new ephemeral messages in the text
    capabilities of the chat.
    Clone a ChatParams.
    void
    Deactivate new ephemeral messages in the text capabilities of the chat.
    Get the backend implementation of the text capabilities of the chat associated
    with the given parameters.
    Get the encryption implementation of the text capabilities of the chat
    associated with the given parameters.
    long
    Get lifetime (in seconds) for all new ephemeral messages in the text
    capabilities of the chat.
    Get the ephemeral message mode of the text capabilities of the chat associated
    with the given parameters.
    long
    Get not read lifetime (in seconds) for all new ephemeral messages in the text
    capabilities of the chat.
    long
    Gets the native pointer used by this class to make native method calls.
    Gets the object stored in this object user's data
    boolean
    Get the encryption status of the text capabilities of the chat associated with
    the given parameters.
    boolean
    Get the real time text status of the text capabilities of the chat associated
    with the given parameters.
    void
    Set the backend implementation of these text capabilities of the chat
    parameters.
    void
    Set the encryption backend implementation of these text capabilities of the
    chat parameters.
    void
    Deprecated.
    void
    Enables or disables forcing of ephemeral messages for the text capabilities of
    the chat associated with the given parameters.
    void
    setRttEnabled(boolean rtt)
    Enables or disables real time text for the text capabilities of the chat
    associated with the given parameters.
    void
    Sets the object to store in this object user's data
     
  • Method Details

    • getBackend

      ChatRoom.Backend getBackend()
      Get the backend implementation of the text capabilities of the chat associated
      with the given parameters.

      Returns:
      the ChatRoom#Backend
    • setBackend

      void setBackend(ChatRoom.Backend backend)
      Set the backend implementation of these text capabilities of the chat
      parameters.

      Parameters:
      backend - The ChatRoom#Backend enum value
    • getEncryptionBackend

      ChatRoom.EncryptionBackend getEncryptionBackend()
      Get the encryption implementation of the text capabilities of the chat
      associated with the given parameters.

      Returns:
      the ChatRoom#EncryptionBackend
    • setEncryptionBackend

      void setEncryptionBackend(ChatRoom.EncryptionBackend backend)
      Set the encryption backend implementation of these text capabilities of the
      chat parameters.

      Parameters:
      backend - The ChatRoom#EncryptionBackend enum value
    • isEncryptionEnabled

      boolean isEncryptionEnabled()
      Get the encryption status of the text capabilities of the chat associated with
      the given parameters.

      Returns:
      true if encryption is enabled, false otherwise
    • getEphemeralLifetime

      long getEphemeralLifetime()
      Get lifetime (in seconds) for all new ephemeral messages in the text
      capabilities of the chat.

      After the message is read, it will be deleted after "lifetime" seconds. see:
      linphone_chat_room_activate_ephemeral()
      Returns:
      the ephemeral lifetime (in seconds)
    • setEphemeralLifetime

      @Deprecated void setEphemeralLifetime(long time)
      Deprecated.
      Set lifetime (in seconds) for all new ephemeral messages in the text
      capabilities of the chat.

      After the message is read, it will be deleted after "time" seconds. see:
      linphone_chat_room_activate_ephemeral()
      deprecated: 20/02/2026 Use activateEphemeral(int) or deactivateEphemeral()
      instead.
    • getEphemeralMode

      ChatRoom.EphemeralMode getEphemeralMode()
      Get the ephemeral message mode of the text capabilities of the chat associated
      with the given parameters.

      Returns:
      the ephemeral message mode ChatRoom#EphemeralMode
    • setEphemeralMode

      void setEphemeralMode(ChatRoom.EphemeralMode mode)
      Enables or disables forcing of ephemeral messages for the text capabilities of
      the chat associated with the given parameters.

      Parameters:
      mode - Ephemeral message mode ChatRoom#EphemeralMode.
    • getEphemeralNotReadLifetime

      long getEphemeralNotReadLifetime()
      Get not read lifetime (in seconds) for all new ephemeral messages in the text
      capabilities of the chat.

      When still not read, it will be deleted after "notReadLifetime" seconds to
      avoid being persistent. see: linphone_chat_room_activate_ephemeral_2()
      Returns:
      The ephemeral not read lifetime (in seconds)
    • isRttEnabled

      boolean isRttEnabled()
      Get the real time text status of the text capabilities of the chat associated
      with the given parameters.

      Returns:
      true if real time text is enabled, false otherwise
    • setRttEnabled

      void setRttEnabled(boolean rtt)
      Enables or disables real time text for the text capabilities of the chat
      associated with the given parameters.

      Parameters:
      rtt - true to enable real time text, false to disable.
    • activateEphemeral

      int activateEphemeral(int lifetime)
      Set lifetime (in seconds) for all new ephemeral messages in the text
      capabilities of the chat.

      After the message is read, it will be deleted after "lifetime" seconds. The
      "not read lifetime" timeout will remain unchanged and will be set to Core.getDefaultEphemeralNotReadLifetime()
      if it is never specified. When still not read, it will be deleted after
      "notReadLifetime" seconds to avoid being persistent. see:
      linphone_chat_room_activate_ephemeral()
      Parameters:
      lifetime - The ephemeral lifetime, strictly positive
    • activateEphemeral

      int activateEphemeral(int lifetime, int notReadLifetime)
      Set lifetime (in seconds) for all new ephemeral messages in the text
      capabilities of the chat.

      After the message is read, it will be deleted after "lifetime" seconds. When
      still not read, it will be deleted after "notReadLifetime" seconds to avoid
      being persistent. see: linphone_chat_room_activate_ephemeral()
      Parameters:
      lifetime - The ephemeral lifetime, strictly positive
      notReadLifetime - The ephemeral not read lifetime, strictly positive
    • clone

      @NonNull ChatParams clone()
      Clone a ChatParams.

      Returns:
      An allocated ChatParams with the same parameters than params
    • deactivateEphemeral

      void deactivateEphemeral()
      Deactivate new ephemeral messages in the text capabilities of the chat.

      see: ChatRoom.deactivateEphemeral()
    • setUserData

      void setUserData(Object data)
      Sets the object to store in this object user's data
      Parameters:
      data - the object to store
    • getUserData

      Object getUserData()
      Gets the object stored in this object user's data
      Returns:
      the object store if any, null otherwise
    • getNativePointer

      long getNativePointer()
      Gets the native pointer used by this class to make native method calls.
      Returns:
      the nativer pointer, as long
    • toString

      String toString()
      Overrides:
      toString in class Object