Freigeben über


DocumentsContract.BuildChildDocumentsUriUsingTree(Uri, String) Method

Definition

Build URI representing the children of the target directory in a document provider.

[Android.Runtime.Register("buildChildDocumentsUriUsingTree", "(Landroid/net/Uri;Ljava/lang/String;)Landroid/net/Uri;", "")]
public static Android.Net.Uri? BuildChildDocumentsUriUsingTree (Android.Net.Uri? treeUri, string? parentDocumentId);
[<Android.Runtime.Register("buildChildDocumentsUriUsingTree", "(Landroid/net/Uri;Ljava/lang/String;)Landroid/net/Uri;", "")>]
static member BuildChildDocumentsUriUsingTree : Android.Net.Uri * string -> Android.Net.Uri

Parameters

treeUri
Uri

the subtree to leverage to gain access to the target document. The target directory must be a descendant of this subtree.

parentDocumentId
String

the document to return children for, which the caller may not have direct access to, and which must be a directory with MIME type of Document#MIME_TYPE_DIR.

Returns

Uri
Attributes

Remarks

Build URI representing the children of the target directory in a document provider. When queried, a provider will return zero or more rows with columns defined by Document.

However, instead of directly accessing the target directory, the returned URI will leverage access granted through a subtree URI, typically returned by Intent#ACTION_OPEN_DOCUMENT_TREE. The target directory must be a descendant (child, grandchild, etc) of the subtree.

This is typically used to access documents under a user-selected directory tree, since it doesn't require the user to separately confirm each new document access.

Java documentation for android.provider.DocumentsContract.buildChildDocumentsUriUsingTree(android.net.Uri, java.lang.String).

Portions of this page are modifications based on work created and shared by the Android Open Source Project and used according to terms described in the Creative Commons 2.5 Attribution License.

Applies to

See also

  • ActionOpenDocumentTree
  • <xref:Android.Provider.DocumentsProvider.IsChildDocument(System.String%2c+System.String)>
  • <xref:Android.Provider.DocumentsContract.BuildChildDocumentsUri(System.String%2c+System.String)>