SyncRequest.Builder.SetRequiresCharging(Boolean) 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.
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).