Inherits com.hyphenate.chat.EMBase< T >.
The parameter configuration class for pulling historical messages from the server.
◆ EMFetchMessageOption()
com.hyphenate.chat.EMFetchMessageOption.EMFetchMessageOption |
( |
| ) |
|
◆ setDirection()
void com.hyphenate.chat.EMFetchMessageOption.setDirection |
( |
EMConversation.EMSearchDirection |
direction | ) |
|
Sets the message search direction.
- Parameters
-
direction | The message search direction. See EMConversation.EMSearchDirection.
- (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 com.hyphenate.chat.EMFetchMessageOption.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 com.hyphenate.chat.EMFetchMessageOption.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 com.hyphenate.chat.EMFetchMessageOption.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 com.hyphenate.chat.EMFetchMessageOption.setMsgTypes |
( |
List< EMMessage.Type > |
msgTypes | ) |
|
Sets the types of message for query.
- Parameters
-
msgTypes | The list of message types for query. See EMStatisticsManager.EMSearchMessageType. You can set several message types. The default value is null , indicating that all types of messages are retrieved. |
◆ setStartTime()
void com.hyphenate.chat.EMFetchMessageOption.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:
- com/hyphenate/chat/EMFetchMessageOption.java