Dela via


DocumentsContract.CreateDocument(ContentResolver, Uri, String, String) Method

Definition

Create a new document with given MIME type and display name.

[Android.Runtime.Register("createDocument", "(Landroid/content/ContentResolver;Landroid/net/Uri;Ljava/lang/String;Ljava/lang/String;)Landroid/net/Uri;", "")]
public static Android.Net.Uri? CreateDocument (Android.Content.ContentResolver content, Android.Net.Uri parentDocumentUri, string mimeType, string displayName);
[<Android.Runtime.Register("createDocument", "(Landroid/content/ContentResolver;Landroid/net/Uri;Ljava/lang/String;Ljava/lang/String;)Landroid/net/Uri;", "")>]
static member CreateDocument : Android.Content.ContentResolver * Android.Net.Uri * string * string -> Android.Net.Uri

Parameters

content
ContentResolver
parentDocumentUri
Uri

directory with Document#FLAG_DIR_SUPPORTS_CREATE

mimeType
String

MIME type of new document

displayName
String

name of new document

Returns

Uri

newly created document, or null if failed

Attributes

Remarks

Create a new document with given MIME type and display name.

Java documentation for android.provider.DocumentsContract.createDocument(android.content.ContentResolver, android.net.Uri, java.lang.String, 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