DownloadManager.Request.SetDestinationInExternalFilesDir Method
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.
Set the local destination for the downloaded file to a path within the application's external files directory (as returned by Context.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
Context: the Context to use in determining the external files directory
- dirType
- String
String: the directory type to pass to Context.getExternalFilesDir(String)
- subPath
- String
String: the path within the external directory, including the destination filename
Returns
this object
- Attributes
Remarks
Set the local destination for the downloaded file to a path within the application's external files directory (as returned by Context.getExternalFilesDir(String). The downloaded file is not scanned by MediaScanner. But it can be made scannable by calling allowScanningByMediaScanner().
Throws: IllegalStateException If the external storage directory cannot be found or created.
Android reference for android.app.DownloadManager.Request.setDestinationInExternalFilesDir.
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.