Inherits io.agora.chat.EMBase< T >.
The parameter configuration class for pulling historical messages from the server.
◆ FetchMessageOption()
io.agora.chat.FetchMessageOption.FetchMessageOption |
( |
| ) |
|
◆ setDirection()
void io.agora.chat.FetchMessageOption.setDirection |
( |
Conversation.SearchDirection |
direction | ) |
|
Sets the message search direction.
- Parameters
-
direction | The message search direction. See Conversation.SearchDirection.
- (Default)
UP : Messages are retrieved in the descending order of the Unix timestamp included in them.
DOWN : Messages are retrieved in the ascending order of the Unix timestamp included in them.
|
◆ setEndTime()
void io.agora.chat.FetchMessageOption.setEndTime |
( |
long |
endTime | ) |
|
Sets the end time for message query.
- Parameters
-
endTime | The end time for message query. The time is a UNIX time stamp in milliseconds. The default value is -1 , indicating that this parameter is ignored during message query.
- If the start time is set to a specific time spot and the end time uses the default value
-1 , the SDK returns messages that are sent and received in the period that is from the start time to the current time.
- If the start time uses the default value
-1 and the end time is set to a specific time spot, the SDK returns messages that are sent and received in the period that is from the timestamp of the first message to the current time.
|
◆ setFrom()
void io.agora.chat.FetchMessageOption.setFrom |
( |
String |
from | ) |
|
Sets the message sender in the group conversation.
- Parameters
-
from | The user ID of the message sender in the group conversation. |
◆ setIsSave()
void io.agora.chat.FetchMessageOption.setIsSave |
( |
boolean |
save | ) |
|
Sets whether the retrieved messages are saved to the database.
- Parameters
-
save | Whether to save the retrieved messages to the database:
true : Yes.
- (Default)
false : No.
|
◆ setMsgTypes()
void io.agora.chat.FetchMessageOption.setMsgTypes |
( |
List< ChatMessage.Type > |
msgTypes | ) |
|
Sets the types of message for query.
- Parameters
-
msgTypes | The list of message types for query. See ChatStatisticsManager.SearchMessageType. You can set several message types. The default value is null , indicating that all types of messages are retrieved. |
◆ setStartTime()
void io.agora.chat.FetchMessageOption.setStartTime |
( |
long |
startTime | ) |
|
Sets the start time for message query.
- Parameters
-
startTime | The start time for message query. The time is a UNIX time stamp in milliseconds. The default value is -1 , indicating that this parameter is ignored during message query.
- If the start time is set to a specific time spot and the end time uses the default value
-1 , the SDK returns messages that are sent and received in the period that is from the start time to the current time.
- If the start time uses the default value
-1 and the end time is set to a specific time spot, the SDK returns messages that are sent and received in the period that is from the timestamp of the first message to the current time.
|
The documentation for this class was generated from the following file:
- io/agora/chat/FetchMessageOption.java