DownloadManager.Request.SetDestinationInExternalFilesDir Method

Definition

Set the local destination for the downloaded file to a path within the application's external files directory (as returned by GetExternalFilesDir(String).

[Android.Runtime.Register("setDestinationInExternalFilesDir", "(Landroid/content/Context;Ljava/lang/String;Ljava/lang/String;)Landroid/app/DownloadManager$Request;", "GetSetDestinationInExternalFilesDir_Landroid_content_Context_Ljava_lang_String_Ljava_lang_String_Handler")]
public virtual Android.App.DownloadManager.Request? SetDestinationInExternalFilesDir (Android.Content.Context? context, string? dirType, string? subPath);
[<Android.Runtime.Register("setDestinationInExternalFilesDir", "(Landroid/content/Context;Ljava/lang/String;Ljava/lang/String;)Landroid/app/DownloadManager$Request;", "GetSetDestinationInExternalFilesDir_Landroid_content_Context_Ljava_lang_String_Ljava_lang_String_Handler")>]
abstract member SetDestinationInExternalFilesDir : Android.Content.Context * string * string -> Android.App.DownloadManager.Request
override this.SetDestinationInExternalFilesDir : Android.Content.Context * string * string -> Android.App.DownloadManager.Request

Parameters

context
Context

the Context to use in determining the external files directory

dirType
String

the directory type to pass to GetExternalFilesDir(String)

subPath
String

the path within the external directory, including the destination filename

Returns

Attributes

Exceptions

If the external storage directory cannot be found or created.

Remarks

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