SpeedRecord.Builder

public static final class SpeedRecord.Builder
extends Object

java.lang.Object
   ↳ android.health.connect.datatypes.SpeedRecord.Builder


Builder class for SpeedRecord

Summary

Public constructors

Builder(Metadata metadata, Instant startTime, Instant endTime, List<SpeedRecord.SpeedRecordSample> speedRecordSamples)

Public methods

SpeedRecord build()
SpeedRecord.Builder clearEndZoneOffset()

Sets the start zone offset of this record to system default.

SpeedRecord.Builder clearStartZoneOffset()

Sets the start zone offset of this record to system default.

SpeedRecord.Builder setEndZoneOffset(ZoneOffset endZoneOffset)

Sets the zone offset of the user when the activity ended

SpeedRecord.Builder setStartZoneOffset(ZoneOffset startZoneOffset)

Sets the zone offset of the user when the activity started

Inherited methods

Public constructors

Builder

Added in API level 34
public Builder (Metadata metadata, 
                Instant startTime, 
                Instant endTime, 
                List<SpeedRecord.SpeedRecordSample> speedRecordSamples)

Parameters
metadata Metadata: Metadata to be associated with the record. See Metadata. This value cannot be null.

startTime Instant: Start time of this activity This value cannot be null.

endTime Instant: End time of this activity This value cannot be null.

speedRecordSamples List: Samples of recorded SpeedRecord This value cannot be null.

Public methods

build

Added in API level 34
public SpeedRecord build ()

Returns
SpeedRecord Object of SpeedRecord This value cannot be null.

clearEndZoneOffset

Added in API level 34
public SpeedRecord.Builder clearEndZoneOffset ()

Sets the start zone offset of this record to system default.

Returns
SpeedRecord.Builder This value cannot be null.

clearStartZoneOffset

Added in API level 34
public SpeedRecord.Builder clearStartZoneOffset ()

Sets the start zone offset of this record to system default.

Returns
SpeedRecord.Builder This value cannot be null.

setEndZoneOffset

Added in API level 34
public SpeedRecord.Builder setEndZoneOffset (ZoneOffset endZoneOffset)

Sets the zone offset of the user when the activity ended

Parameters
endZoneOffset ZoneOffset: This value cannot be null.

Returns
SpeedRecord.Builder This value cannot be null.

setStartZoneOffset

Added in API level 34
public SpeedRecord.Builder setStartZoneOffset (ZoneOffset startZoneOffset)

Sets the zone offset of the user when the activity started

Parameters
startZoneOffset ZoneOffset: This value cannot be null.

Returns
SpeedRecord.Builder This value cannot be null.