Language

DownloadManager.Request.SetRequiresCharging(Boolean) Method

Definition

Specify that to run this download, the device needs to be plugged in.

[Android.Runtime.Register("setRequiresCharging", "(Z)Landroid/app/DownloadManager$Request;", "GetSetRequiresCharging_ZHandler", ApiSince=24)]
public virtual Android.App.DownloadManager.Request? SetRequiresCharging(bool requiresCharging);
[<Android.Runtime.Register("setRequiresCharging", "(Z)Landroid/app/DownloadManager$Request;", "GetSetRequiresCharging_ZHandler", ApiSince=24)>]
abstract member SetRequiresCharging : bool -> Android.App.DownloadManager.Request
override this.SetRequiresCharging : bool -> Android.App.DownloadManager.Request

Parameters

requiresCharging
Boolean

boolean: Whether or not the device is plugged in.

Returns

This Android.App.DownloadManager.Request instance, allowing calls to be chained.

Attributes

Remarks

Specify that to run this download, the device needs to be plugged in. This defaults to false.

See also:

Android reference for android.app.DownloadManager.Request.setRequiresCharging.

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