Device
public
final
class
Device
extends Object
java.lang.Object | |
↳ | 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 | |
---|---|
class |
Device.Builder
|
Constants | |
---|---|
int |
DEVICE_TYPE_CHEST_STRAP
Wearable straps worn around the chest, primarily used for highly accurate heart rate monitoring during exercise. |
int |
DEVICE_TYPE_CONSUMER_MEDICAL_DEVICE
Over-the-counter Medical devices. |
int |
DEVICE_TYPE_FITNESS_BAND
Wearable devices, typically worn on the wrist or arm, primarily focused on tracking physical activity and basic health metrics. |
int |
DEVICE_TYPE_FITNESS_EQUIPMENT
Tools and accessories designed for use during physical exercise. |
int |
DEVICE_TYPE_FITNESS_MACHINE
Stationary or mobile equipment designed for physical exercise. |
int |
DEVICE_TYPE_GLASSES
Wearable glasses with integrated technology and computing capabilities. |
int |
DEVICE_TYPE_HEAD_MOUNTED
Devices worn on the head, beyond glasses, designed for specific health or fitness applications, often involving sensing or stimulation. |
int |
DEVICE_TYPE_HEARABLE
Electronic devices worn in or around the ears, often with audio capabilities. |
int |
DEVICE_TYPE_METER
Equipment attachments that measure a specific metric. |
int |
DEVICE_TYPE_PHONE
A handheld mobile computing and communication device, equipped with various sensors (e.g., accelerometer, GPS) that can collect health and fitness data, or serve as a primary interface for manual data entry or managing data from connected peripherals. |
int |
DEVICE_TYPE_PORTABLE_COMPUTER
A portable computer usually with GPS and performance tracking capabilities that is either handheld or attached to a device. |
int |
DEVICE_TYPE_RING
Wearable devices worn on a finger, typically designed for discreet tracking of sleep, activity, and potentially other physiological data. |
int |
DEVICE_TYPE_SCALE
Devices designed to measure body weight and often other body composition metrics. |
int |
DEVICE_TYPE_SMART_DISPLAY
Stationary devices with a screen and connectivity, often used in homes or gyms to provide guided workouts, track progress, and offer health-related information. |
int |
DEVICE_TYPE_UNKNOWN
A device whose specific type is not identified, not yet supported in the Health Connect list, or where the originating device type could not be determined by the data writer. |
int |
DEVICE_TYPE_WATCH
A wearable computing device designed to be worn on the wrist, typically featuring an interactive display and offering a broad range of functionalities including, but not limited to, health and fitness tracking, app integration, and communication. |
Public methods | |
---|---|
boolean
|
equals(Object object)
Indicates whether some other object is "equal to" this one. |
String
|
getManufacturer()
|
String
|
getModel()
|
int
|
getType()
|
int
|
hashCode()
Returns a hash code value for the object. |
Inherited methods | |
---|---|
Constants
DEVICE_TYPE_CHEST_STRAP
public static final int DEVICE_TYPE_CHEST_STRAP
Wearable straps worn around the chest, primarily used for highly accurate heart rate monitoring during exercise.
Constant Value: 7 (0x00000007)
DEVICE_TYPE_CONSUMER_MEDICAL_DEVICE
public static final int DEVICE_TYPE_CONSUMER_MEDICAL_DEVICE
Over-the-counter Medical devices.
For example: CGM / Glucometers, Blood Pressure Cuff
Constant Value: 9 (0x00000009)
DEVICE_TYPE_FITNESS_BAND
public static final int DEVICE_TYPE_FITNESS_BAND
Wearable devices, typically worn on the wrist or arm, primarily focused on tracking physical activity and basic health metrics.
Constant Value: 6 (0x00000006)
DEVICE_TYPE_FITNESS_EQUIPMENT
public static final int DEVICE_TYPE_FITNESS_EQUIPMENT
Tools and accessories designed for use during physical exercise.
For example: Dumbbells, Jump Ropes
Constant Value: 13 (0x0000000d)
DEVICE_TYPE_FITNESS_MACHINE
public static final int DEVICE_TYPE_FITNESS_MACHINE
Stationary or mobile equipment designed for physical exercise.
For example: Treadmill, Indoor Cycles, Rowing Machines, Outdoor Bicycle. Outdoor Scooter
Constant Value: 12 (0x0000000c)
DEVICE_TYPE_GLASSES
public static final int DEVICE_TYPE_GLASSES
Wearable glasses with integrated technology and computing capabilities.
Constant Value: 10 (0x0000000a)
DEVICE_TYPE_HEAD_MOUNTED
public static final int DEVICE_TYPE_HEAD_MOUNTED
Devices worn on the head, beyond glasses, designed for specific health or fitness applications, often involving sensing or stimulation.
For example: VR/MR Headsets, ECG Head Bands
Constant Value: 5 (0x00000005)
DEVICE_TYPE_HEARABLE
public static final int DEVICE_TYPE_HEARABLE
Electronic devices worn in or around the ears, often with audio capabilities.
Constant Value: 11 (0x0000000b)
DEVICE_TYPE_METER
public static final int DEVICE_TYPE_METER
Equipment attachments that measure a specific metric.
For example: Pedal Meters, Insole Meters
Constant Value: 15 (0x0000000f)
DEVICE_TYPE_PHONE
public static final int DEVICE_TYPE_PHONE
A handheld mobile computing and communication device, equipped with various sensors (e.g., accelerometer, GPS) that can collect health and fitness data, or serve as a primary interface for manual data entry or managing data from connected peripherals.
Constant Value: 2 (0x00000002)
DEVICE_TYPE_PORTABLE_COMPUTER
public static final int DEVICE_TYPE_PORTABLE_COMPUTER
A portable computer usually with GPS and performance tracking capabilities that is either handheld or attached to a device.
For example: Handheld GPS, Cycling Computer, Rowing Computer
Constant Value: 14 (0x0000000e)
DEVICE_TYPE_RING
public static final int DEVICE_TYPE_RING
Wearable devices worn on a finger, typically designed for discreet tracking of sleep, activity, and potentially other physiological data.
Constant Value: 4 (0x00000004)
DEVICE_TYPE_SCALE
public static final int DEVICE_TYPE_SCALE
Devices designed to measure body weight and often other body composition metrics.
Constant Value: 3 (0x00000003)
DEVICE_TYPE_SMART_DISPLAY
public static final int DEVICE_TYPE_SMART_DISPLAY
Stationary devices with a screen and connectivity, often used in homes or gyms to provide guided workouts, track progress, and offer health-related information.
For example: Home Smart Displays, Interactive Fitness Mirrors
Constant Value: 8 (0x00000008)
DEVICE_TYPE_UNKNOWN
public static final int DEVICE_TYPE_UNKNOWN
A device whose specific type is not identified, not yet supported in the Health Connect list, or where the originating device type could not be determined by the data writer.
Constant Value: 0 (0x00000000)
DEVICE_TYPE_WATCH
public static final int DEVICE_TYPE_WATCH
A wearable computing device designed to be worn on the wrist, typically featuring an interactive display and offering a broad range of functionalities including, but not limited to, health and fitness tracking, app integration, and communication.
Constant Value: 1 (0x00000001)
Public methods
equals
public boolean equals (Object object)
Indicates whether some other object is "equal to" this one.
Parameters | |
---|---|
object |
Object : the reference object with which to compare.
This value may be null . |
Returns | |
---|---|
boolean |
true if this object is the same as the obj |
getManufacturer
public String getManufacturer ()
Returns | |
---|---|
String |
The device manufacturer if set, null otherwise |
getModel
public String getModel ()
Returns | |
---|---|
String |
The device model if set, null otherwise |
getType
public int getType ()
Returns | |
---|---|
int |
The device type if set DEVICE_TYPE_UNKNOWN otherwise
Value is DEVICE_TYPE_UNKNOWN , DEVICE_TYPE_WATCH , DEVICE_TYPE_PHONE , DEVICE_TYPE_SCALE , DEVICE_TYPE_RING , DEVICE_TYPE_HEAD_MOUNTED , DEVICE_TYPE_FITNESS_BAND , DEVICE_TYPE_CHEST_STRAP , DEVICE_TYPE_SMART_DISPLAY , DEVICE_TYPE_CONSUMER_MEDICAL_DEVICE , DEVICE_TYPE_GLASSES , DEVICE_TYPE_HEARABLE , DEVICE_TYPE_FITNESS_MACHINE , DEVICE_TYPE_FITNESS_EQUIPMENT , DEVICE_TYPE_PORTABLE_COMPUTER , or DEVICE_TYPE_METER |
hashCode
public int hashCode ()
Returns a hash code value for the object.
Returns | |
---|---|
int |
a hash code value for this object. |
Content and code samples on this page are subject to the licenses described in the Content License. Java and OpenJDK are trademarks or registered trademarks of Oracle and/or its affiliates.
Last updated 2025-08-20 UTC.