Metadata
class Metadata
kotlin.Any | |
↳ | android.health.connect.datatypes.Metadata |
Set of shared metadata fields for Record
Summary
Nested classes | |
---|---|
Constants | |
---|---|
static Int |
For actively recorded data by the user. |
static Int |
For passively recorded data by the app. |
static Int |
For manually entered data by the user. |
static Int |
Unknown recording method. |
Public methods | |
---|---|
Boolean |
Indicates whether some other object is "equal to" this one. |
String? | |
Long | |
DataOrigin | |
Device | |
String |
getId() |
Instant | |
Int |
Returns recording method which indicates how data was recorded for the |
Int |
hashCode() Returns a hash code value for the object. |
Constants
RECORDING_METHOD_ACTIVELY_RECORDED
static val RECORDING_METHOD_ACTIVELY_RECORDED: Int
For actively recorded data by the user.
For e.g. An exercise session actively recorded by the user using a phone or a watch device.
Value: 1
RECORDING_METHOD_AUTOMATICALLY_RECORDED
static val RECORDING_METHOD_AUTOMATICALLY_RECORDED: Int
For passively recorded data by the app.
For e.g. Steps data recorded by a watch or phone without the user starting a session.
Value: 2
RECORDING_METHOD_MANUAL_ENTRY
static val RECORDING_METHOD_MANUAL_ENTRY: Int
For manually entered data by the user.
For e.g. Nutrition or weight data entered by the user.
Value: 3
RECORDING_METHOD_UNKNOWN
static val RECORDING_METHOD_UNKNOWN: Int
Unknown recording method.
Value: 0
Public methods
equals
fun equals(other: Any?): Boolean
Indicates whether some other object is "equal to" this one.
Parameters | |
---|---|
obj |
the reference object with which to compare. |
object |
the reference object with which to compare. This value may be null . |
Return | |
---|---|
Boolean |
true if this object is the same as the obj |
getClientRecordId
fun getClientRecordId(): String?
Return | |
---|---|
String? |
Client record ID if set, null otherwise |
getClientRecordVersion
fun getClientRecordVersion(): Long
Return | |
---|---|
Long |
Client record version if set, 0 otherwise |
getDataOrigin
fun getDataOrigin(): DataOrigin
Return | |
---|---|
DataOrigin |
Corresponds to package name if set. If no data origin is set getDataOrigin().getPackageName() will return null |
getDevice
fun getDevice(): Device
Return | |
---|---|
Device |
The device details that contributed to this record This value cannot be null . |
getId
fun getId(): String
Return | |
---|---|
String |
Record identifier if set, empty string otherwise This value cannot be null . |
getLastModifiedTime
fun getLastModifiedTime(): Instant
Return | |
---|---|
Instant |
Record's last modified time if set, Instant.EPOCH otherwise This value cannot be null . |
getRecordingMethod
fun getRecordingMethod(): Int
Returns recording method which indicates how data was recorded for the Record
hashCode
fun hashCode(): Int
Returns a hash code value for the object.
Return | |
---|---|
Int |
a hash code value for this object. |