- rootId
- the root to search under.
- query
- string to match documents against.
- projection
- list of NoType:android/provider/DocumentsContract$Document;Href=../../../reference/android/provider/DocumentsContract.Document.html columns to put into the cursor. If null all supported columns should be included.
Documentation for this section has not yet been entered.
Type Reason Java.IO.FileNotFoundException
Return documents that that match the given query under the requested root. The returned documents should be sorted by relevance in descending order. How documents are matched against the query string is an implementation detail left to each provider, but it's suggested that at least NoType:android/provider/DocumentsContract$Document;Href=../../../reference/android/provider/DocumentsContract.Document.html#COLUMN_DISPLAY_NAME be matched in a case-insensitive fashion.
Only documents may be returned; directories are not supported in search results.
If your provider is cloud-based, and you have some data cached or pinned locally, you may return the local data immediately, setting DocumentsContract.ExtraLoading on the Cursor to indicate that you are still fetching additional data. Then, when the network data is available, you can send a change notification to trigger a requery and return the complete contents.
To support change notifications, you must Android.Database.ICursor.SetNotificationUri(Android.Content.ContentResolver, Android.Net.Uri) with a relevant Uri, such as DocumentsContract.BuildSearchDocumentsUri(string, System.String, System.String). Then you can call Android.Content.ContentResolver.NotifyChange(Android.Net.Uri, Android.Database.ContentObserver, Android.Database.ContentObserver) with that Uri to send change notifications.