searchConversationContainsFile

open fun searchConversationContainsFile(@NonNull context: Context, @Nullable searchKey: String): List<ThreadItem>

Call this method to search for any conversations contains a document or a file attachment given a searchKey.

If the searchKey is empty or null, the method will return a null result.

The searchKey can be any file extension (must start with one point) or as the following table :

document.DOC,.DOCX,.RTF,.XLS,.XLSX,.PPT,.PPTX,.PDF,.TXT
doc.DOC,.DOCX,.RTF,.XLS,.XLSX,.PPT,.PPTX,.PDF,.TXT
word.DOC,.DOCX,.RTF
excel.XLS,.XLSX
presentation.PPT,.PPTX
powerpoint.PPT,.PPTX
pdf.PDF
text.TXT
image.TIF,.JPG,.JPEG,.PNG,.GIF,.BPM,.SVG
picture.TIF,.JPG,.JPEG,.PNG,.GIF,.BPM,.SVG
music.WAV,.MP3,.FLAC,.AL,.WMA
audio.WAV,.MP3,.FLAC,.AL,.WMA
video.MP4,.FLV,.WMV,.OGV,.AVI

This method should be executed in a worker thread since it contains a lot of operation that can exceed 5sec or block the UI thread.

Return

Conversation list or null

See also

Parameters

context

The application context

searchKey

A search keyword