ActivityIntensityRecord.Builder
public
static
final
class
ActivityIntensityRecord.Builder
extends Object
java.lang.Object | |
↳ | android.health.connect.datatypes.ActivityIntensityRecord.Builder |
Builder class for ActivityIntensityRecord
Summary
Public constructors | |
---|---|
Builder(Metadata metadata, Instant startTime, Instant endTime, int activityIntensityType)
|
Public methods | |
---|---|
ActivityIntensityRecord
|
build()
Returns |
ActivityIntensityRecord.Builder
|
setEndZoneOffset(ZoneOffset endZoneOffset)
Sets the |
ActivityIntensityRecord.Builder
|
setStartZoneOffset(ZoneOffset startZoneOffset)
Sets the |
Inherited methods | |
---|---|
Public constructors
Builder
public Builder (Metadata metadata, Instant startTime, Instant endTime, int activityIntensityType)
Parameters | |
---|---|
metadata |
Metadata : Metadata to be associated with the record. See Metadata .
This value cannot be null . |
startTime |
Instant : Start time of this activity instensity record.
This value cannot be null . |
endTime |
Instant : End time of this activity intensity record.
This value cannot be null . |
activityIntensityType |
int : Value is ActivityIntensityRecord.ACTIVITY_INTENSITY_TYPE_MODERATE , or ActivityIntensityRecord.ACTIVITY_INTENSITY_TYPE_VIGOROUS |
Public methods
build
public ActivityIntensityRecord build ()
Returns ActivityIntensityRecord
Returns | |
---|---|
ActivityIntensityRecord |
This value cannot be null . |
setEndZoneOffset
public ActivityIntensityRecord.Builder setEndZoneOffset (ZoneOffset endZoneOffset)
Sets the ZoneOffset
of the user when the activity ended.
Defaults to the system zone offset if not set.
Parameters | |
---|---|
endZoneOffset |
ZoneOffset : This value cannot be null . |
Returns | |
---|---|
ActivityIntensityRecord.Builder |
This value cannot be null . |
setStartZoneOffset
public ActivityIntensityRecord.Builder setStartZoneOffset (ZoneOffset startZoneOffset)
Sets the ZoneOffset
of the user when the activity started.
Defaults to the system zone offset if not set.
Parameters | |
---|---|
startZoneOffset |
ZoneOffset : This value cannot be null . |
Returns | |
---|---|
ActivityIntensityRecord.Builder |
This value cannot be null . |