searchLocalMessages

Introduction

Search the local messages.

Parameter details

Parameter name Parameter type Required Platform Description
searchParam V2TimMessageSearchParam yes All The search parameter.

Returned template

V2TimValueCallback<V2TimMessageSearchResult>

{
    code : int
    desc : String
    data : {
      messageSearchResultItems : List<V2TimMessageSearchResultItem>// The list of search result messages.
      totalCount : int // The amount of results.
    }
}

Return value details

name type description
code int Request result: Error codes. 0 means success.
desc String The description of the failure.
data V2TimMessageSearchResult The list of search result messages.

Code example

    V2TimMessageSearchParam searchParam = new V2TimMessageSearchParam(
          conversationID: "",
          keywordList: [],
          type: 0,
          userIDList: [],
          messageTypeList: [],
          searchTimePeriod: 0,
          searchTimePosition: 0,
          pageIndex: 0,
          pageSize: 10);
    V2TimValueCallback<V2TimMessageSearchResult> searchLocalMessagesRes = await TencentImSDKPlugin
    .v2TIMManager
    .getMessageManager()
    .searchLocalMessages(
        searchParam:searchParam
    );
    if(searchLocalMessagesRes.code == 0){
    }

results matching ""

    No results matching ""