Android.Provider.DocumentsProvider.QueryChildDocuments Method
Return the children documents contained in the requested directory.

Syntax

[Android.Runtime.Register("queryChildDocuments", "(Ljava/lang/String;[Ljava/lang/String;Ljava/lang/String;)Landroid/database/Cursor;", "GetQueryChildDocuments_Ljava_lang_String_arrayLjava_lang_String_Ljava_lang_String_Handler")]
public abstract Android.Database.ICursor QueryChildDocuments (string parentDocumentId, string[] projection, string sortOrder)

See Also

DocumentsContract.ExtraLoading
DocumentsContract.ExtraInfo
DocumentsContract.ExtraError

Parameters

parentDocumentId
the directory to return children for.
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.
sortOrder
how to order the rows, formatted as an SQL ORDER BY clause (excluding the ORDER BY itself). Passing null will use the default sort order, which may be unordered. This ordering is a hint that can be used to prioritize how data is fetched from the network, but UI may always enforce a specific ordering.

Returns

Documentation for this section has not yet been entered.

Exceptions

TypeReason
Java.IO.FileNotFoundException

Remarks

Return the children documents contained in the requested directory. This must only return immediate descendants, as additional queries will be issued to recursively explore the tree.

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 return a Cursor with extras, you need to extend and override Android.Database.ICursor.Extras.

To support change notifications, you must Android.Database.ICursor.SetNotificationUri(Android.Content.ContentResolver, Android.Net.Uri) with a relevant Uri, such as DocumentsContract.BuildChildDocumentsUri(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.

[Android Documentation]

Requirements

Namespace: Android.Provider
Assembly: Mono.Android (in Mono.Android.dll)
Assembly Versions: 0.0.0.0