Added in API level 34

Device


class Device
kotlin.Any
   ↳ android.health.connect.datatypes.Device

A physical device (such as phone, watch, scale, or chest strap) which captured associated health data point.

Device needs to be populated by users of the API. Metadata fields not provided by clients will remain absent.

Summary

Nested classes

Constants
static Int

static Int

static Int

static Int

static Int

static Int

static Int

static Int

static Int

Public methods
Boolean
equals(other: Any?)

Indicates whether some other object is "equal to" this one.

String?

String?

Int

Int

Returns a hash code value for the object.

Constants

DEVICE_TYPE_CHEST_STRAP

Added in API level 34
static val DEVICE_TYPE_CHEST_STRAP: Int
Value: 7

DEVICE_TYPE_FITNESS_BAND

Added in API level 34
static val DEVICE_TYPE_FITNESS_BAND: Int
Value: 6

DEVICE_TYPE_HEAD_MOUNTED

Added in API level 34
static val DEVICE_TYPE_HEAD_MOUNTED: Int
Value: 5

DEVICE_TYPE_PHONE

Added in API level 34
static val DEVICE_TYPE_PHONE: Int
Value: 2

DEVICE_TYPE_RING

Added in API level 34
static val DEVICE_TYPE_RING: Int
Value: 4

DEVICE_TYPE_SCALE

Added in API level 34
static val DEVICE_TYPE_SCALE: Int
Value: 3

DEVICE_TYPE_SMART_DISPLAY

Added in API level 34
static val DEVICE_TYPE_SMART_DISPLAY: Int
Value: 8

DEVICE_TYPE_UNKNOWN

Added in API level 34
static val DEVICE_TYPE_UNKNOWN: Int
Value: 0

DEVICE_TYPE_WATCH

Added in API level 34
static val DEVICE_TYPE_WATCH: Int
Value: 1

Public methods

equals

Added in API level 34
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

getManufacturer

Added in API level 34
fun getManufacturer(): String?
Return
String? The device manufacturer if set, null otherwise

getModel

Added in API level 34
fun getModel(): String?
Return
String? The device model if set, null otherwise

hashCode

Added in API level 34
fun hashCode(): Int

Returns a hash code value for the object.

Return
Int a hash code value for this object.