Package org.linphone.core
Interface ChatRoom
public interface ChatRoom
A chat room is the place where
To create (or find) a
object. A chat room is uniquely identified by it's local and remote SIP
addresses, meaning you can only have one chat room between two accounts (unless
the backend is
or
Be careful as a
created asynchronously, so make sure you add a
returned object to be notified when it will be in state
All chat rooms are loaded from database when the
can get them using
chat rooms nor ones for which the local address doesn't match an existing
your configuration file by setting hide_empty_chat_rooms=0 and/or
hide_chat_rooms_from_removed_proxies=0.
ChatMessage
are exchanged. To create (or find) a
ChatRoom
, you first need a ChatRoomParams
object. A chat room is uniquely identified by it's local and remote SIP
addresses, meaning you can only have one chat room between two accounts (unless
the backend is
ChatRoom.Backend.FlexisipChat
). Then you can call Core.searchChatRoom(org.linphone.core.ChatRoomParams, org.linphone.core.Address, org.linphone.core.Address, org.linphone.core.Address[])
or
Core.createChatRoom(org.linphone.core.ConferenceParams, org.linphone.core.Address[])
.Be careful as a
ChatRoom.Backend.FlexisipChat
backend ChatRoom
will becreated asynchronously, so make sure you add a
ChatRoomListener
to thereturned object to be notified when it will be in state
ChatRoom.State.Created
.All chat rooms are loaded from database when the
Core
starts, and youcan get them using
Core.getChatRooms()
. This method doesn't return emptychat rooms nor ones for which the local address doesn't match an existing
Account
identity, unless you specify otherwise in the [misc] section ofyour configuration file by setting hide_empty_chat_rooms=0 and/or
hide_chat_rooms_from_removed_proxies=0.
-
Nested Class Summary
Nested ClassesModifier and TypeInterfaceDescriptionstatic enum
static enum
static enum
static enum
static enum
static enum
static enum
-
Method Summary
Modifier and TypeMethodDescriptionvoid
addListener
(ChatRoomListener listener) void
addParticipant
(Address addr) Adds a participant to a chat room.boolean
addParticipants
(Address[] addresses) Adds several participants to a chat room at once.void
Allow cpim on a basic chat room .void
Allow multipart on a basic chat room .boolean
Tells whether a chat room is able to handle participants.void
compose()
Notifies the destination of the chat message being composed that the user is
typing a new message.Creates an empty message attached to the given chat room.createFileTransferMessage
(Content initialContent) Creates a message attached to the given chat room with a particular content.createForwardMessage
(ChatMessage message) Creates a forward message attached to the given chat room with a particular
message.createMessage
(String message) Deprecated.01/07/2020.createMessageFromUtf8
(String message) Creates a message attached to the given chat room with a plain text content
filled with the given message.createReplyMessage
(ChatMessage message) Creates a reply message attached to the given chat room with a particular
message.createVoiceRecordingMessage
(Recorder recorder) Creates a chat message with a voice recording attached to the given chat room.void
Delete all messages from the history.void
deleteMessage
(ChatMessage message) Delete a message from the chat room history.boolean
Check if all participants support ephemeral messages.findEventLog
(String messageId) Gets the event log sent or received in this chat room that matches a chat
message with the given message_id.findMessage
(String messageId) Gets the chat message sent or received in this chat room that matches the
message_id.findParticipant
(Address address) Finds a participant of a chat room from its address.Returns the local account to which this chat room is related.getCall()
Gets the current call associated to this chatroom if any To commit a message,
useChatMessage.send()
int
Gets the capabilities of a chat room.int
getChar()
When realtime text is enabled in aCall
(seeCallParams#realtimeTextEnabled
), LinphoneCoreIsComposingReceivedCb is called everytime a Real-Time Text
character is received from peer.Address[]
Gets the list of participants that are currently composing.Gets the conference address of the chat room.Gets the conference information associated to the chatroom.getCore()
Returns back pointer toCore
object.long
Returns the creation time for the chat room.Deprecated.17/07/2025.Content[]
Gets all contents for which content-type starts with either text/ or
application/.long
Gets lifetime (in seconds) for all new ephemeral messages in the chat room.Gets the ephemeral mode of the chat room.getHistory
(int nbMessage) Deprecated.30/07/2024.EventLog[]
getHistory
(int nbMessage, int filters) Gets nb_message most recent events from chat_room chat room, sorted from oldest
to most recent.EventLog[]
getHistoryEvents
(int nbEvents) Gets nb_events most recent events from chat_room chat room, sorted from oldest
to most recent.int
Gets the number of events in a chat room.EventLog[]
getHistoryMessageEvents
(int nbEvents) Gets nb_events most recent chat message events from chat_room chat room, sorted
from oldest to most recent.getHistoryRange
(int begin, int end) Deprecated.30/07/2024.EventLog[]
getHistoryRange
(int begin, int end, int filters) Gets the partial list of events in the given range, sorted from oldest to most
recent.EventLog[]
getHistoryRangeBetween
(EventLog firstEvent, EventLog lastEvent, int filters) Gets the partial list of messages between two givenEventLog
, sorted
from oldest to most recent.EventLog[]
getHistoryRangeEvents
(int begin, int end) Gets the partial list of events in the given range, sorted from oldest to most
recent.EventLog[]
getHistoryRangeMessageEvents
(int begin, int end) Gets the partial list of chat message events in the given range, sorted from
oldest to most recent.EventLog[]
getHistoryRangeNear
(int before, int after, EventLog event, int filters) Gets the partial list of messages in the given range near theEventLog
provided, sorted from oldest to most recent.int
Deprecated.30/07/2024.int
getHistorySize
(int filters) Gets the number of messages in a chat room.Returns the chat room identifier.Gets the last chat message sent or received in this chat room.long
Returns the last updated time for the chat room.Get the local address associated to this chat room.getMe()
Gets the participant representing myself in the chat room.Content[]
Gets all contents for which content-type starts with either video/, audio/ or
image/.boolean
getMuted()
Gets if a chat room has been flagged as muted (not by default).long
Gets the native pointer used by this class to make native method calls.int
Gets the number of participants in the chat room (that is without ourselves).Returns current parameters associated with the chat room.Gets the list of participants of a chat room.Get the peer address associated to this chat room.Gets the security level of a chat room.getState()
Gets the state of the chat room.Gets the subject of a chat room.Gets the subject of a chat room (as an UTF8 string)
Gets all unread messages for this chat room, sorted from oldest to most recent.int
Gets the number of unread messages in the chatroom.Gets the object stored in this object user's databoolean
Deprecated.16/03/2022 useisReadOnly()
instead.boolean
hasCapability
(int mask) Checks if a chat room has given capabilities.boolean
isEmpty()
boolean
Returns whether or not the ephemeral message feature is enabled in the chat
room.boolean
Returns whether or not a message can be sent using this chat room.boolean
Tells whether the remote is currently composing a message.void
leave()
Leaves a chat room.void
Mark all messages of the conversation as read.void
notifyParticipantDeviceRegistration
(Address participantDevice) Notifies the chatroom that a participant device has just registered.void
receiveChatMessage
(ChatMessage message) Used to receive a chat message when using async mechanism with IM
enchat_roomyption engine.void
removeListener
(ChatRoomListener listener) void
removeParticipant
(Participant participant) Removes a participant of a chat room.void
removeParticipants
(Participant[] participants) Removes several participants of a chat room at once.searchChatMessageByText
(String text, EventLog from, SearchDirection direction) Searches chat messages by text.void
setConferenceAddress
(Address conferenceAddress) Sets the conference address of a group chat room.void
setEphemeralEnabled
(boolean enable) Enable or disable the ephemeral message feature in the chat room.void
setEphemeralLifetime
(long time) Sets lifetime (in seconds) for all new ephemeral messages in the chat room.void
Sets the ephemeral mode of the chat room.void
setMuted
(boolean muted) Sets if a chat room should be considered as muted or not.void
setParticipantAdminStatus
(Participant participant, boolean isAdmin) Changes the admin status of a participant of a chat room (you need to be an
admin yourself to do this).void
setParticipantDevices
(Address participantAddress, ParticipantDeviceIdentity[] deviceIdentities) Sets the list of participant devices in the form of SIP URIs with GRUUs for a
given participant.void
setSubject
(String subject) Sets the subject of a chat room.void
setSubjectUtf8
(String subject) Sets the subject of a chat room (utf-8 string).void
setUserData
(Object data) Sets the object to store in this object user's datastateToString
(ChatRoom.State state) Converts aChatRoom.State
enum to a string.toString()
-
Method Details
-
getAccount
Returns the local account to which this chat room is related.
- Returns:
- the related
Account
object if any, null otherwise.
-
getCall
Gets the current call associated to this chatroom if any To commit a message,
useChatMessage.send()
- Returns:
Call
or null.
-
getCapabilities
int getCapabilities()Gets the capabilities of a chat room.
- Returns:
- The capabilities of the chat room (as a
LinphoneChatRoomCapabilitiesMask)
-
getChar
int getChar()When realtime text is enabled in aCall
(seeCallParams#realtimeTextEnabled
), LinphoneCoreIsComposingReceivedCb is called everytime a Real-Time Text
character is received from peer.
getChar()
pops a character previously received from the receive queue,
and returns it. When a new line character is received, aChatMessage
is
automatically created with received characters and notified to the application
through theCoreListener
orChatRoomListener
interfaces.- Returns:
- RFC 4103/T.140 char
-
getComposingAddresses
Gets the list of participants that are currently composing.
- Returns:
- List of addresses that are in the is_composing state.
-
getConferenceAddress
Gets the conference address of the chat room.
- Returns:
- The conference address of the chat room or null if this type of chat
room is not conference based.
-
setConferenceAddress
Sets the conference address of a group chat room.
This function needs to be called from the
LinphoneChatRoomCbsConferenceAddressGenerationCb callback and only there. This
function is meaningful only for server implementation of chatroom, and shall
not by used by client applications.- Parameters:
conferenceAddress
- The conferenceAddress
to be used by the group
chat room
-
getConferenceInfo
Gets the conference information associated to the chatroom.
- Returns:
- the
ConferenceInfo
.
-
getCore
- Returns:
- the
Core
object this chat room is attached to.
-
getCreationTime
long getCreationTime()Returns the creation time for the chat room.
- Returns:
- the time at which the chat room was created
-
getCurrentParams
Deprecated.17/07/2025. UsegetParams()
instead.Returns current parameters associated with the chat room.
This is typically the parameters passed during theChatRoom
creation
process to linphone_core_chat_room_create_chat_room() or some default
parameters if noChatRoomParams
was explicitely passed duringChatRoom
creation.- Returns:
- the current
ChatRoomParams
parameters.
-
getDocumentContents
Gets all contents for which content-type starts with either text/ or
application/.
- Returns:
- A list of contents considered as "document".
-
isEphemeralEnabled
boolean isEphemeralEnabled()Returns whether or not the ephemeral message feature is enabled in the chat
room.
- Returns:
- true if ephemeral is enabled, false otherwise.
-
setEphemeralEnabled
void setEphemeralEnabled(boolean enable) Enable or disable the ephemeral message feature in the chat room.
Works only for flexisip-based chat room. An ephemeral message will
automatically disappear from the sender and recipient's chatrooms after a
specified timeout configurable withsetEphemeralLifetime(long)
. The timer
starts when the message has been displayed at the recipent, which means:- Parameters:
enable
- true if the ephemeral message feature is enabled, false
otherwise.
-
getEphemeralLifetime
long getEphemeralLifetime()Gets lifetime (in seconds) for all new ephemeral messages in the chat room.
After the message is read, it will be deleted after "time" seconds. see:#ephemeralEnabled
- Returns:
- the ephemeral lifetime (in secoonds)
-
setEphemeralLifetime
void setEphemeralLifetime(long time) Sets lifetime (in seconds) for all new ephemeral messages in the chat room.
After the message is read, it will be deleted after "time" seconds. see:#ephemeralEnabled
- Parameters:
time
- The ephemeral lifetime, default is 0 (disabled)
warning: A value of "time" equal to 0 disables ephemeral messages
-
getEphemeralMode
ChatRoom.EphemeralMode getEphemeralMode()Gets the ephemeral mode of the chat room.
see:#ephemeralEnabled
- Returns:
- the ephemeral mode
ChatRoom.EphemeralMode
-
setEphemeralMode
Sets the ephemeral mode of the chat room.
see:#ephemeralEnabled
- Parameters:
mode
- The ephemeral modeChatRoom.EphemeralMode
warning: This function only changes the mode of ephemeral messagesChatRoom.EphemeralMode
. It is required to manually enable ephemeral messages after setting the mode
by calling#enableEphemeral
-
getHistoryEventsSize
int getHistoryEventsSize()Gets the number of events in a chat room.
- Returns:
- the number of events.
-
getHistorySize
Deprecated.30/07/2024. UsegetHistorySize()
instead.Gets the number of messages in a chat room.
- Returns:
- the number of messages.
-
getIdentifier
Returns the chat room identifier.
warning: This method returns a null pointer if the ChatRoom is in the
Instantiated state- Returns:
- the conference identifier.
-
isEmpty
boolean isEmpty()- Returns:
- true if there are no
ChatMessage
, false otherwise.
-
isReadOnly
boolean isReadOnly()Returns whether or not a message can be sent using this chat room.
A chat room may be read only until it's created, or when it's a group you have
left.- Returns:
- true if a chat message can't be sent in it, false otherwise.
-
isRemoteComposing
boolean isRemoteComposing()Tells whether the remote is currently composing a message.
- Returns:
- true if the remote is currently composing a message, false otherwise.
-
getLastMessageInHistory
Gets the last chat message sent or received in this chat room.
- Returns:
- the latest
ChatMessage
or null if no message.
-
getLastUpdateTime
long getLastUpdateTime()Returns the last updated time for the chat room.
- Returns:
- the last updated time
-
getLocalAddress
Get the local address associated to this chat room.
warning: This method returns a guessed address based on the me participant if
the ChatRoom is in the Instantiated state- Returns:
- The local address.
-
getMe
Gets the participant representing myself in the chat room.
- Returns:
- The participant representing myself in the conference or null if me is
not set.
-
getMediaContents
Gets all contents for which content-type starts with either video/, audio/ or
image/.
- Returns:
- A list of contents considered as "media".
-
getMuted
boolean getMuted()Gets if a chat room has been flagged as muted (not by default).
A muted chat room isn't used to compute unread messages total count.- Returns:
- true if the chat room is muted, false otherwise.
-
setMuted
void setMuted(boolean muted) Sets if a chat room should be considered as muted or not.
A muted chat room isn't used to compute unread messages total count.- Parameters:
muted
- true to flag it as muted, false to un-mute it.
-
getNbParticipants
int getNbParticipants()Gets the number of participants in the chat room (that is without ourselves).
- Returns:
- The number of participants in the chat room
-
getParams
Returns current parameters associated with the chat room.
This is typically the parameters passed during theChatRoom
creation
process to linphone_core_chat_room_create_chat_room() or some default
parameters if noChatRoomParams
was explicitely passed duringChatRoom
creation.- Returns:
- the current
ChatRoomParams
parameters.
-
getParticipants
Gets the list of participants of a chat room.
- Returns:
- A of the participants
-
getPeerAddress
Get the peer address associated to this chat room.
warning: This method returns an invalid address if the ChatRoom is in the
Instantiated state- Returns:
- The peer address.
-
getSecurityLevel
ChatRoom.SecurityLevel getSecurityLevel()Gets the security level of a chat room.
- Returns:
- The current
ChatRoom.SecurityLevel
of the chat room
-
getState
ChatRoom.State getState()Gets the state of the chat room.
- Returns:
- The current
ChatRoom.State
of the chat room
-
getSubject
Gets the subject of a chat room.
- Returns:
- The subject of the chat room.
-
setSubject
Sets the subject of a chat room.
- Parameters:
subject
- The new subject to set for the chat room
-
getSubjectUtf8
Gets the subject of a chat room (as an UTF8 string)
- Returns:
- The subject of the chat room.
-
setSubjectUtf8
Sets the subject of a chat room (utf-8 string).
- Parameters:
subject
- The new subject to set for the chat room
-
getUnreadHistory
Gets all unread messages for this chat room, sorted from oldest to most recent.
- Returns:
- A list of unread chat messages.
-
getUnreadMessagesCount
int getUnreadMessagesCount()Gets the number of unread messages in the chatroom.
- Returns:
- the number of unread messages.
-
addParticipant
Adds a participant to a chat room.
This may fail if this type of chat room does not handle participants. Use
canHandleParticipants()
to know if this chat room handles participants.- Parameters:
addr
- The address of the participant to add to the chat room
-
addParticipants
Adds several participants to a chat room at once.
This may fail if this type of chat room does not handle participants. Use
canHandleParticipants()
to know if this chat room handles participants.- Parameters:
addresses
- The participants to add.- Returns:
- true if everything is OK, false otherwise
-
allowCpim
void allowCpim()Allow cpim on a basic chat room .
-
allowMultipart
void allowMultipart()Allow multipart on a basic chat room .
-
canHandleParticipants
boolean canHandleParticipants()Tells whether a chat room is able to handle participants.
- Returns:
- true if the chat room can handle participants, false otherwise
-
compose
void compose()Notifies the destination of the chat message being composed that the user is
typing a new message.
-
createEmptyMessage
Creates an empty message attached to the given chat room.
- Returns:
- a new
ChatMessage
-
createFileTransferMessage
Creates a message attached to the given chat room with a particular content.
UseChatMessage.send()
to initiate the transfer- Parameters:
initialContent
-Content
initial content.- Returns:
- a new
ChatMessage
-
createForwardMessage
Creates a forward message attached to the given chat room with a particular
message.
- Parameters:
message
-ChatMessage
message to be forwarded.- Returns:
- a new
ChatMessage
-
createMessage
Deprecated.01/07/2020. UsecreateMessageFromUtf8(java.lang.String)
instead.Creates a message attached to the given chat room with a plain text content
filled with the given message.
- Parameters:
message
- text message, null if absent.- Returns:
- a new
ChatMessage
-
createMessageFromUtf8
Creates a message attached to the given chat room with a plain text content
filled with the given message.
Introduced in 01/07/2020- Parameters:
message
- text message in UTF8, null if absent.- Returns:
- a new
ChatMessage
-
createReplyMessage
Creates a reply message attached to the given chat room with a particular
message.
- Parameters:
message
-ChatMessage
message to reply to.- Returns:
- a new
ChatMessage
-
createVoiceRecordingMessage
Creates a chat message with a voice recording attached to the given chat room.
warning: If the recorder isn't in Closed state, it will return an empty
message!- Parameters:
recorder
- theRecorder
object used to record the voice message.- Returns:
- a new
ChatMessage
-
deleteHistory
void deleteHistory()Delete all messages from the history.
-
deleteMessage
Delete a message from the chat room history.
- Parameters:
message
- TheChatMessage
object to remove.
-
ephemeralSupportedByAllParticipants
boolean ephemeralSupportedByAllParticipants()Check if all participants support ephemeral messages.
It doesn't prevent to send ephemeral messages in the room but those who don't
support it won't delete messages after lifetime has expired. The check is done
by verifying the participant's advertised capabilities (+org.linphone.specs
parameter). see:#ephemeralEnabled
- Returns:
- true if all participants in the chat room support ephemeral messages,
false otherwise
-
findEventLog
Gets the event log sent or received in this chat room that matches a chat
message with the given message_id.
- Parameters:
messageId
- The id of the message to find- Returns:
- the
EventLog
if found or null.
-
findMessage
Gets the chat message sent or received in this chat room that matches the
message_id.
- Parameters:
messageId
- The id of the message to find- Returns:
- the
ChatMessage
if found or null.
-
findParticipant
Finds a participant of a chat room from its address.
- Parameters:
address
- TheAddress
to search in the list of participants of the
chat room- Returns:
- The participant if found, null otherwise.
-
getHistory
Gets nb_message most recent events from chat_room chat room, sorted from oldest
to most recent.
- Parameters:
nbMessage
- Number of events to retrieve. 0 means everything.filters
- The LinphoneChatRoomHistoryFilterMask mask to filter the results
withChatRoom.HistoryFilter
- Returns:
- A list of
-
getHistory
Deprecated.30/07/2024. UsegetHistory(int, int)
instead.Gets nb_message most recent messages from chat_room chat room, sorted from
oldest to most recent.
- Parameters:
nbMessage
- Number of message to retrieve. 0 means everything.- Returns:
- A list of
-
getHistoryEvents
Gets nb_events most recent events from chat_room chat room, sorted from oldest
to most recent.
- Parameters:
nbEvents
- Number of events to retrieve. 0 means everything.- Returns:
- The list of the most recent events.
-
getHistoryMessageEvents
Gets nb_events most recent chat message events from chat_room chat room, sorted
from oldest to most recent.
- Parameters:
nbEvents
- Number of events to retrieve. 0 means everything.- Returns:
- A list
-
getHistoryRange
Gets the partial list of events in the given range, sorted from oldest to most
recent.
- Parameters:
begin
- The first event of the range to be retrieved. History most recent
message has index 0.end
- The last event of the range to be retrieved. History oldest message
has index of history size - 1 (usegetHistorySize()
to retrieve history
size)- Returns:
- A list of
-
getHistoryRange
Deprecated.30/07/2024. UsegetHistoryRange(int, int, int)
instead.Gets the partial list of messages in the given range, sorted from oldest to
most recent.
- Parameters:
begin
- The first message of the range to be retrieved. History most
recent message has index 0.end
- The last message of the range to be retrieved. History oldest
message has index of history size - 1 (usegetHistorySize()
to retrieve
history size)- Returns:
- A list of chat messages.
-
getHistoryRangeBetween
@NonNull EventLog[] getHistoryRangeBetween(@Nullable EventLog firstEvent, @Nullable EventLog lastEvent, int filters) Gets the partial list of messages between two givenEventLog
, sorted
from oldest to most recent.
If either first_event or last_event is null, then nothing is returned.- Parameters:
firstEvent
- TheEventLog
object corresponding to the event.lastEvent
- TheEventLog
object corresponding to the event.filters
- The LinphoneChatRoomHistoryFilterMask mask to filter the results
withChatRoom.HistoryFilter
- Returns:
- A list of between the two provided events, if any.
-
getHistoryRangeEvents
Gets the partial list of events in the given range, sorted from oldest to most
recent.
- Parameters:
begin
- The first event of the range to be retrieved. History most recent
event has index 0.end
- The last event of the range to be retrieved. History oldest event
has index of history size - 1- Returns:
- The list of the found events.
-
getHistoryRangeMessageEvents
Gets the partial list of chat message events in the given range, sorted from
oldest to most recent.
- Parameters:
begin
- The first event of the range to be retrieved. History most recent
event has index 0.end
- The last event of the range to be retrieved. History oldest event
has index of history size - 1- Returns:
- The list of chat message events.
-
getHistoryRangeNear
@NonNull EventLog[] getHistoryRangeNear(int before, int after, @Nullable EventLog event, int filters) Gets the partial list of messages in the given range near theEventLog
provided, sorted from oldest to most recent.
If before and after are both set to 0, the returned list is empty.- Parameters:
before
- The number of messages to retrieve before the event provided.after
- The number of messages to retrieve after the event provided.event
- TheEventLog
object corresponding to the event.filters
- The LinphoneChatRoomHistoryFilterMask mask to filter the results
withChatRoom.HistoryFilter
- Returns:
- A list of near the event provided included.
-
getHistorySize
int getHistorySize(@NonNull int filters) Gets the number of messages in a chat room.
- Parameters:
filters
- The LinphoneChatRoomHistoryFilterMask mask to filter the result
withChatRoom.HistoryFilter
- Returns:
- the number of messages.
-
hasBeenLeft
Deprecated.16/03/2022 useisReadOnly()
instead.Returns whether or not the chat room has been left.
- Returns:
- true if the chat room has been left, false otherwise.
-
hasCapability
boolean hasCapability(int mask) Checks if a chat room has given capabilities.
- Parameters:
mask
- a LinphoneChatRoomCapabilitiesMask mask- Returns:
- true if the mask matches, false otherwise
-
leave
void leave()Leaves a chat room.
-
markAsRead
void markAsRead()Mark all messages of the conversation as read.
-
notifyParticipantDeviceRegistration
Notifies the chatroom that a participant device has just registered.
This function is meaningful only for server implementation of chatroom, and
shall not by used by client applications.- Parameters:
participantDevice
- list of the participant devices to be used by the
group chat room
-
receiveChatMessage
Used to receive a chat message when using async mechanism with IM
enchat_roomyption engine.
- Parameters:
message
-ChatMessage
object
-
removeParticipant
Removes a participant of a chat room.
- Parameters:
participant
- The participant to remove from the chat room
-
removeParticipants
Removes several participants of a chat room at once.
- Parameters:
participants
- The participants to remove.
-
searchChatMessageByText
@Nullable EventLog searchChatMessageByText(@NonNull String text, @Nullable EventLog from, SearchDirection direction) Searches chat messages by text.
- Parameters:
text
- The text to search in messagesfrom
- TheEventLog
object corresponding to the event where to
start the searchdirection
- TheSearchDirection
where to search,
LinphoneSearchDirectionUp will search older messages while
LinphoneSearchDirectionDown will search newer messages- Returns:
- the
EventLog
corresponding to the message if found or null.
-
setParticipantAdminStatus
Changes the admin status of a participant of a chat room (you need to be an
admin yourself to do this).
- Parameters:
participant
- The Participant for which to change the admin statusisAdmin
- A boolean value telling whether the participant should now be an
admin or not
-
setParticipantDevices
void setParticipantDevices(@NonNull Address participantAddress, @NonNull ParticipantDeviceIdentity[] deviceIdentities) Sets the list of participant devices in the form of SIP URIs with GRUUs for a
given participant.
This function is meaningful only for server implementation of chatroom, and
shall not by used by client applications.- Parameters:
participantAddress
- The participant addressdeviceIdentities
- List of the participant devices to be used by the group
chat room
-
stateToString
- Parameters:
state
- aChatRoom.State
to convert to string- Returns:
- the string representation of the
ChatRoom.State
-
addListener
-
removeListener
-
setUserData
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()
-