Android Guides | Samples

Android.App.DownloadManager.Request Class

This class contains all the information necessary to request a new download.

See Also: DownloadManager+Request

Syntax

[Android.Runtime.Register("android/app/DownloadManager$Request", DoNotGenerateAcw=true)]
public class DownloadManager.Request : Object

Remarks

This class contains all the information necessary to request a new download. The URI is the only required parameter. Note that the default download destination is a shared volume where the system might delete your file if it needs to reclaim space for system use. If this is a problem, use a location on external storage (see DownloadManager+Request.SetDestinationUri(Uri).

[Android Documentation]

Requirements

Namespace: Android.App
Assembly: Mono.Android (in Mono.Android.dll)
Assembly Versions: 0.0.0.0
Since: Added in API level 9

The members of Android.App.DownloadManager.Request are listed below.

See Also: Object

Public Constructors

Protected Constructors

A constructor used when creating managed representations of JNI objects; called by the runtime.

Public Fields

const
NetworkMobileDownloadNetwork (1). Bit flag for DownloadManager+Request.SetAllowedNetworkTypes(DownloadNetwork) corresponding to ConnectivityType.Mobile.
const
NetworkWifiDownloadNetwork (2). Bit flag for DownloadManager+Request.SetAllowedNetworkTypes(DownloadNetwork) corresponding to ConnectivityType.Wifi.
const
VisibilityHiddenDownloadVisibility (2). This download doesn't show in the UI or in the notifications.
const
VisibilityVisibleDownloadVisibility (0). This download is visible but only shows in the notifications while it's in progress.
const
VisibilityVisibleNotifyCompletedDownloadVisibility (1). This download is visible and shows in the notifications while in progress and after completion.
const
VisibilityVisibleNotifyOnlyCompletionDownloadVisibility (3). This download shows in the notifications after completion ONLY.

Protected Properties

[read-only]
override
ThresholdClassIntPtr. This API supports the Mono for Android infrastructure and is not intended to be used directly from your code.
[read-only]
override
ThresholdTypeType. This API supports the Mono for Android infrastructure and is not intended to be used directly from your code.

Public Methods

AddRequestHeader(String, String) : DownloadManager+Request
Add an HTTP header to be included with the download request.
AllowScanningByMediaScanner()
If the file to be downloaded is to be scanned by MediaScanner, this method should be called before DownloadManager.Enqueue(DownloadManager+Request) is called.
SetAllowedNetworkTypes(DownloadNetwork) : DownloadManager+Request
Restrict the types of networks over which this download may proceed.
SetAllowedOverMetered(Boolean) : DownloadManager+Request
Set whether this download may proceed over a metered network connection.
SetAllowedOverRoaming(Boolean) : DownloadManager+Request
Set whether this download may proceed over a roaming connection.
SetDescription(ICharSequence) : DownloadManager+Request
Set a description of this download, to be displayed in notifications (if enabled)
SetDescription(String) : DownloadManager+Request
SetDestinationInExternalFilesDir(Context, String, String) : DownloadManager+Request
Set the local destination for the downloaded file to a path within the application's external files directory (as returned by Context.GetExternalFilesDir(String).
SetDestinationInExternalPublicDir(String, String) : DownloadManager+Request
Set the local destination for the downloaded file to a path within the public external storage directory (as returned by Environment.GetExternalStoragePublicDirectory(String)).
SetDestinationUri(Uri) : DownloadManager+Request
Set the local destination for the downloaded file.
SetMimeType(String) : DownloadManager+Request
Set the MIME content type of this download.
SetNotificationVisibility(DownloadVisibility) : DownloadManager+Request
Control whether a system notification is posted by the download manager while this download is running or when it is completed.
SetShowRunningNotification(Boolean) : DownloadManager+Request
Control whether a system notification is posted by the download manager while this download is running.
SetTitle(ICharSequence) : DownloadManager+Request
Set the title of this download, to be displayed in notifications (if enabled).
SetTitle(String) : DownloadManager+Request
SetVisibleInDownloadsUi(Boolean) : DownloadManager+Request
Set whether this download should be displayed in the system's Downloads UI.