Public Member Functions | |
void | setGetType (int getType) |
void | setUserID (String userID) |
void | setGroupID (String groupID) |
void | setCount (int count) |
void | setLastMsg (V2TIMMessage lastMsg) |
void | setLastMsgSeq (long lastMsgSeq) |
void | setGetTimeBegin (long getTimeBegin) |
void | setGetTimePeriod (long getTimePeriod) |
int | getGetType () |
String | getUserID () |
String | getGroupID () |
int | getCount () |
V2TIMMessage | getLastMsg () |
long | getLastMsgSeq () |
long | getGetTimeBegin () |
long | getGetTimePeriod () |
void | setMessageTypeList (List< Integer > messageTypeList) |
List< Integer > | getMessageTypeList () |
void | setMessageSeqList (List< Long > messageSeqList) |
List< Long > | getMessageSeqList () |
Static Public Attributes | |
static final int | V2TIM_GET_CLOUD_OLDER_MSG = 1 |
static final int | V2TIM_GET_CLOUD_NEWER_MSG = 2 |
static final int | V2TIM_GET_LOCAL_OLDER_MSG = 3 |
static final int | V2TIM_GET_LOCAL_NEWER_MSG = 4 |
|
inline |
Message pulling type (whether to pull older or newer messages from the cloud or local storage)
If messages are pulled from the cloud, they will be merged with locally stored messages before being returned. If network connection is not available, only locally stored messages will be returned.
About getType, the starting message, and the time range for message pulling:
getType | Pulling type. Valid values: V2TIM_GET_CLOUD_OLDER_MSG, V2TIM_GET_CLOUD_NEWER_MSG, V2TIM_GET_LOCAL_OLDER_MSG, V2TIM_GET_LOCAL_NEWER_MSG |
|
inline |
Pull the message history of a one-to-one chat
|
inline |
Pull the message history of a group chat
|
inline |
Number of messages to be pulled
|
inline |
Start message for message pulling
When one-to-one messages are pulled, only lastMsg can be used to specify the start point for message pulling. If lastMsg is not specified, the Chat SDK will pull starting from the newest message of the conversation.
When group messages are pulled, lastMsg or lastMsgSeq can be used to specify the start point for message pulling:
If both lastMsg and lastMsgSeq are specified, the Chat SDK will use lastMsg to determine the start point for message pulling.
If neither lastMsg nor lastMsgSeq is specified, there are two cases for determining the start point for message pulling:
|
inline |
Start sequence for group message pulling
|
inline |
Time range for message pulling
getTimeBegin: indicates the start point of the time range. The default value is 0, indicating to start pulling now. The value can also be a UTC timestamp, in seconds.
getTimePeriod: indicates the length of the time range, in seconds. The default value is 0, indicating that the time range is not limited.
The direction of the time range is determined by the getType parameter:
If getType is V2TIM_GET_CLOUD_OLDER_MSG/V2TIM_GET_LOCAL_OLDER_MSG, the time range is a time period (determined by getTimePeriod) prior to getTimeBegin.
If getType is V2TIM_GET_CLOUD_NEWER_MSG/V2TIM_GET_LOCAL_NEWER_MSG, the time range is a time period (determined by getTimePeriod) after getTimeBegin.
The value range is a closed range, including the start and end points in time. The relationship between the two is as follows:
|
inline |
Duration for message pulling
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
Set the type of messages to pull. This API works only if getType is V2TIM_GET_LOCAL_OLDER_MSG or V2TIM_GET_LOCAL_NEWER_MSG. If null is passed in, all message types will be pulled.
|
inline |
|
inline |
Pull the historical messages of a group chat according to the specified sequences (supported in 7.1 and later versions)
|
inline |
|
static |
Get older messages from the cloud
|
static |
Get newer messages from the cloud
|
static |
Get older messages from local storage
|
static |
Get newer messages from local storage