Added in API level 34
Builder
class Builder
kotlin.Any | |
↳ | android.health.connect.datatypes.SexualActivityRecord.Builder |
Builder class for SexualActivityRecord
Summary
Public constructors | |
---|---|
Public methods | |
---|---|
SexualActivityRecord |
build() |
SexualActivityRecord.Builder |
Sets the zone offset of this record to system default. |
SexualActivityRecord.Builder |
setZoneOffset(zoneOffset: ZoneOffset) Sets the zone offset of the user when the activity happened |
Public constructors
Builder
Added in API level 34
Builder(
metadata: Metadata,
time: Instant,
protectionUsed: Int)
Parameters | |
---|---|
metadata |
Metadata: Metadata to be associated with the record. See Metadata . This value cannot be null . |
time |
Instant: Start time of this activity This value cannot be null . |
protectionUsed |
Int: Whether protection was used during sexual activity. Optional field, null if unknown. Allowed values: Protection. Value is android.health.connect.datatypes.SexualActivityRecord.SexualActivityProtectionUsed#PROTECTION_USED_UNKNOWN , android.health.connect.datatypes.SexualActivityRecord.SexualActivityProtectionUsed#PROTECTION_USED_PROTECTED , or android.health.connect.datatypes.SexualActivityRecord.SexualActivityProtectionUsed#PROTECTION_USED_UNPROTECTED |
Public methods
build
Added in API level 34
fun build(): SexualActivityRecord
Return | |
---|---|
SexualActivityRecord |
Object of SexualActivityRecord This value cannot be null . |
clearZoneOffset
Added in API level 34
fun clearZoneOffset(): SexualActivityRecord.Builder
Sets the zone offset of this record to system default.
Return | |
---|---|
SexualActivityRecord.Builder |
This value cannot be null . |
setZoneOffset
Added in API level 34
fun setZoneOffset(zoneOffset: ZoneOffset): SexualActivityRecord.Builder
Sets the zone offset of the user when the activity happened
Parameters | |
---|---|
zoneOffset |
ZoneOffset: This value cannot be null . |
Return | |
---|---|
SexualActivityRecord.Builder |
This value cannot be null . |