Language

SyncRequest.Builder.SetRequiresCharging(Boolean) Method

Definition

Specifies whether the sync requires the device to be charging.

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

Parameters

requiresCharging
Boolean

true to require charging; otherwise, false. The default is false.

Returns

This builder.

Attributes

Remarks

On Android 7.0 and 7.1, calling this method enables the charging requirement regardless of the argument.

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.

Java documentation for android.content.SyncRequest.Builder.setRequiresCharging(boolean).

Applies to