Device
public final class 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.
Some device types are only available on newer versions of Health Connect. See androidx.health.connect.client.HealthConnectFeatures.FEATURE_EXTENDED_DEVICE_TYPES for more details.
Summary
Constants |
|
|---|---|
static final int |
TYPE_CHEST_STRAP = 7 |
static final int |
Requires |
static final int |
|
static final int |
Requires |
static final int |
TYPE_FITNESS_MACHINE = 12Requires |
static final int |
TYPE_GLASSES = 10Requires |
static final int |
|
static final int |
TYPE_HEARABLE = 11Requires |
static final int |
TYPE_METER = 15Requires |
static final int |
TYPE_PHONE = 2 |
static final int |
Requires |
static final int |
TYPE_RING = 4 |
static final int |
TYPE_SCALE = 3 |
static final int |
|
static final int |
TYPE_UNKNOWN = 0 |
static final int |
TYPE_WATCH = 1 |
Public methods |
|
|---|---|
boolean |
|
final String |
an optional client supplied manufacturer of the device |
final String |
getModel()an optional client supplied model of the device |
final int |
getType()a client supplied type of the device |
int |
hashCode() |
@NonNull String |
toString() |
Constants
TYPE_CONSUMER_MEDICAL_DEVICE
public static final int TYPE_CONSUMER_MEDICAL_DEVICE = 9
Requires androidx.health.connect.client.HealthConnectFeatures.FEATURE_EXTENDED_DEVICE_TYPES. If the feature is not available, this device type will be treated as TYPE_UNKNOWN.
TYPE_FITNESS_EQUIPMENT
public static final int TYPE_FITNESS_EQUIPMENT = 13
Requires androidx.health.connect.client.HealthConnectFeatures.FEATURE_EXTENDED_DEVICE_TYPES. If the feature is not available, this device type will be treated as TYPE_UNKNOWN.
TYPE_FITNESS_MACHINE
public static final int TYPE_FITNESS_MACHINE = 12
Requires androidx.health.connect.client.HealthConnectFeatures.FEATURE_EXTENDED_DEVICE_TYPES. If the feature is not available, this device type will be treated as TYPE_UNKNOWN.
TYPE_GLASSES
public static final int TYPE_GLASSES = 10
Requires androidx.health.connect.client.HealthConnectFeatures.FEATURE_EXTENDED_DEVICE_TYPES. If the feature is not available, this device type will be treated as TYPE_UNKNOWN.
TYPE_HEARABLE
public static final int TYPE_HEARABLE = 11
Requires androidx.health.connect.client.HealthConnectFeatures.FEATURE_EXTENDED_DEVICE_TYPES. If the feature is not available, this device type will be treated as TYPE_UNKNOWN.
TYPE_METER
public static final int TYPE_METER = 15
Requires androidx.health.connect.client.HealthConnectFeatures.FEATURE_EXTENDED_DEVICE_TYPES. If the feature is not available, this device type will be treated as TYPE_UNKNOWN.
TYPE_PORTABLE_COMPUTER
public static final int TYPE_PORTABLE_COMPUTER = 14
Requires androidx.health.connect.client.HealthConnectFeatures.FEATURE_EXTENDED_DEVICE_TYPES. If the feature is not available, this device type will be treated as TYPE_UNKNOWN.
Public constructors
Public methods
getManufacturer
public final String getManufacturer()
an optional client supplied manufacturer of the device