DocumentsContract Class
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Defines the contract between a documents provider and the platform.
[Android.Runtime.Register("android/provider/DocumentsContract", DoNotGenerateAcw=true)]
public sealed class DocumentsContract : Java.Lang.Object
[<Android.Runtime.Register("android/provider/DocumentsContract", DoNotGenerateAcw=true)>]
type DocumentsContract = class
inherit Object
- Inheritance
- Attributes
Remarks
Defines the contract between a documents provider and the platform.
To create a document provider, extend DocumentsProvider
, which provides a foundational implementation of this contract.
All client apps must hold a valid URI permission grant to access documents, typically issued when a user makes a selection through Intent#ACTION_OPEN_DOCUMENT
, Intent#ACTION_CREATE_DOCUMENT
, or Intent#ACTION_OPEN_DOCUMENT_TREE
.
Java documentation for android.provider.DocumentsContract
.
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.
Fields
ActionDocumentSettings |
Action of intent issued by DocumentsUI when user wishes to open/configure/manage a particular document in the provider application. |
ExtraError |
Optional string included in a directory |
ExtraExcludeSelf |
Set this in a DocumentsUI intent to cause a package's own roots to be excluded from the roots list. |
ExtraInfo |
Optional string included in a directory |
ExtraInitialUri |
Sets the desired initial location visible to user when file chooser is shown. |
ExtraLoading |
Optional boolean flag included in a directory |
ExtraOrientation |
An extra number of degrees that an image should be rotated during the decode process to be presented correctly. |
ExtraPrompt |
Overrides the default prompt text in DocumentsUI when set in an intent. |
MetadataExif |
Get Exif information using DocumentsContract#getDocumentMetadata. |
MetadataTreeCount |
Get total count of all documents currently stored under the given directory tree. |
MetadataTreeSize |
Get total size of all documents currently stored under the given directory tree. |
MetadataTypes |
Get string array identifies the type or types of metadata returned using DocumentsContract#getDocumentMetadata. |
ProviderInterface |
Intent action used to identify |
QueryArgDisplayName |
Key for |
QueryArgExcludeMedia |
Key for |
QueryArgFileSizeOver |
Key for |
QueryArgLastModifiedAfter |
Key for |
QueryArgMimeTypes |
Key for |
Properties
Class |
Returns the runtime class of this |
Handle |
The handle to the underlying Android instance. (Inherited from Object) |
JniIdentityHashCode | (Inherited from Object) |
JniPeerMembers | |
PeerReference | (Inherited from Object) |
ThresholdClass |
This API supports the Mono for Android infrastructure and is not intended to be used directly from your code. (Inherited from Object) |
ThresholdType |
This API supports the Mono for Android infrastructure and is not intended to be used directly from your code. (Inherited from Object) |
Methods
BuildChildDocumentsUri(String, String) |
Build URI representing the children of the target directory in a document provider. |
BuildChildDocumentsUriUsingTree(Uri, String) |
Build URI representing the children of the target directory in a document provider. |
BuildDocumentUri(String, String) |
Build URI representing the target |
BuildDocumentUriUsingTree(Uri, String) |
Build URI representing the target |
BuildRecentDocumentsUri(String, String) |
Build URI representing the recently modified documents of a specific root in a document provider. |
BuildRootsUri(String) |
Build URI representing the roots of a document provider. |
BuildRootUri(String, String) |
Build URI representing the given |
BuildSearchDocumentsUri(String, String, String) |
Build URI representing a search for matching documents under a specific root in a document provider. |
BuildTreeDocumentUri(String, String) |
Build URI representing access to descendant documents of the given
|
Clone() |
Creates and returns a copy of this object. (Inherited from Object) |
CopyDocument(ContentResolver, Uri, Uri) |
Copies the given document. |
CreateDocument(ContentResolver, Uri, String, String) |
Create a new document with given MIME type and display name. |
CreateWebLinkIntent(ContentResolver, Uri, Bundle) |
Creates an intent for obtaining a web link for the specified document. |
DeleteDocument(ContentResolver, Uri) |
Delete the given document. |
Dispose() | (Inherited from Object) |
Dispose(Boolean) | (Inherited from Object) |
EjectRoot(ContentResolver, Uri) |
Ejects the given root. |
Equals(Object) |
Indicates whether some other object is "equal to" this one. (Inherited from Object) |
FindDocumentPath(ContentResolver, Uri) |
Finds the canonical path from the top of the document tree. |
GetDocumentId(Uri) |
Extract the |
GetDocumentMetadata(ContentResolver, Uri) |
Returns metadata associated with the document. |
GetDocumentThumbnail(ContentResolver, Uri, Point, CancellationSignal) |
Return thumbnail representing the document at the given URI. |
GetHashCode() |
Returns a hash code value for the object. (Inherited from Object) |
GetRootId(Uri) |
Extract the |
GetSearchDocumentsQuery(Uri) |
Extract the search query from a URI built by
|
GetTreeDocumentId(Uri) |
Extract the via |
IsChildDocument(ContentResolver, Uri, Uri) |
Test if a document is descendant (child, grandchild, etc) from the given parent. |
IsDocumentUri(Context, Uri) |
Test if the given URI represents a |
IsRootsUri(Context, Uri) |
Test if the given URI represents all roots of the authority
backed by |
IsRootUri(Context, Uri) |
Test if the given URI represents specific root backed by |
IsTreeUri(Uri) |
Test if the given URI represents a |
JavaFinalize() |
Called by the garbage collector on an object when garbage collection determines that there are no more references to the object. (Inherited from Object) |
MoveDocument(ContentResolver, Uri, Uri, Uri) |
Moves the given document under a new parent. |
Notify() |
Wakes up a single thread that is waiting on this object's monitor. (Inherited from Object) |
NotifyAll() |
Wakes up all threads that are waiting on this object's monitor. (Inherited from Object) |
RemoveDocument(ContentResolver, Uri, Uri) |
Removes the given document from a parent directory. |
RenameDocument(ContentResolver, Uri, String) |
Change the display name of an existing document. |
SetHandle(IntPtr, JniHandleOwnership) |
Sets the Handle property. (Inherited from Object) |
ToArray<T>() | (Inherited from Object) |
ToString() |
Returns a string representation of the object. (Inherited from Object) |
UnregisterFromRuntime() | (Inherited from Object) |
Wait() |
Causes the current thread to wait until it is awakened, typically by being <em>notified</em> or <em>interrupted</em>. (Inherited from Object) |
Wait(Int64, Int32) |
Causes the current thread to wait until it is awakened, typically by being <em>notified</em> or <em>interrupted</em>, or until a certain amount of real time has elapsed. (Inherited from Object) |
Wait(Int64) |
Causes the current thread to wait until it is awakened, typically by being <em>notified</em> or <em>interrupted</em>, or until a certain amount of real time has elapsed. (Inherited from Object) |
Explicit Interface Implementations
IJavaPeerable.Disposed() | (Inherited from Object) |
IJavaPeerable.DisposeUnlessReferenced() | (Inherited from Object) |
IJavaPeerable.Finalized() | (Inherited from Object) |
IJavaPeerable.JniManagedPeerState | (Inherited from Object) |
IJavaPeerable.SetJniIdentityHashCode(Int32) | (Inherited from Object) |
IJavaPeerable.SetJniManagedPeerState(JniManagedPeerStates) | (Inherited from Object) |
IJavaPeerable.SetPeerReference(JniObjectReference) | (Inherited from Object) |
Extension Methods
JavaCast<TResult>(IJavaObject) |
Performs an Android runtime-checked type conversion. |
JavaCast<TResult>(IJavaObject) | |
GetJniTypeName(IJavaPeerable) |