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 |
Wearable straps worn around the chest, primarily used for highly accurate heart rate monitoring during exercise. |
static Int |
Over-the-counter Medical devices. |
static Int |
Wearable devices, typically worn on the wrist or arm, primarily focused on tracking physical activity and basic health metrics. |
static Int |
Tools and accessories designed for use during physical exercise. |
static Int |
Stationary or mobile equipment designed for physical exercise. |
static Int |
Wearable glasses with integrated technology and computing capabilities. |
static Int |
Devices worn on the head, beyond glasses, designed for specific health or fitness applications, often involving sensing or stimulation. |
static Int |
Electronic devices worn in or around the ears, often with audio capabilities. |
static Int |
Equipment attachments that measure a specific metric. |
static Int |
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. |
static Int |
A portable computer usually with GPS and performance tracking capabilities that is either handheld or attached to a device. |
static Int |
Wearable devices worn on a finger, typically designed for discreet tracking of sleep, activity, and potentially other physiological data. |
static Int |
Devices designed to measure body weight and often other body composition metrics. |
static Int |
Stationary devices with a screen and connectivity, often used in homes or gyms to provide guided workouts, track progress, and offer health-related information. |
static Int |
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. |
static Int |
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 |
Indicates whether some other object is "equal to" this one. |
String? | |
String? |
getModel() |
Int |
getType() |
Int |
hashCode() Returns a hash code value for the object. |
Constants
DEVICE_TYPE_CHEST_STRAP
static val DEVICE_TYPE_CHEST_STRAP: Int
Wearable straps worn around the chest, primarily used for highly accurate heart rate monitoring during exercise.
Value: 7
DEVICE_TYPE_CONSUMER_MEDICAL_DEVICE
static val DEVICE_TYPE_CONSUMER_MEDICAL_DEVICE: Int
Over-the-counter Medical devices.
For example: CGM / Glucometers, Blood Pressure Cuff
Value: 9
DEVICE_TYPE_FITNESS_BAND
static val DEVICE_TYPE_FITNESS_BAND: Int
Wearable devices, typically worn on the wrist or arm, primarily focused on tracking physical activity and basic health metrics.
Value: 6
DEVICE_TYPE_FITNESS_EQUIPMENT
static val DEVICE_TYPE_FITNESS_EQUIPMENT: Int
Tools and accessories designed for use during physical exercise.
For example: Dumbbells, Jump Ropes
Value: 13
DEVICE_TYPE_FITNESS_MACHINE
static val DEVICE_TYPE_FITNESS_MACHINE: Int
Stationary or mobile equipment designed for physical exercise.
For example: Treadmill, Indoor Cycles, Rowing Machines, Outdoor Bicycle. Outdoor Scooter
Value: 12
DEVICE_TYPE_GLASSES
static val DEVICE_TYPE_GLASSES: Int
Wearable glasses with integrated technology and computing capabilities.
Value: 10
DEVICE_TYPE_HEAD_MOUNTED
static val DEVICE_TYPE_HEAD_MOUNTED: Int
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
Value: 5
DEVICE_TYPE_HEARABLE
static val DEVICE_TYPE_HEARABLE: Int
Electronic devices worn in or around the ears, often with audio capabilities.
Value: 11
DEVICE_TYPE_METER
static val DEVICE_TYPE_METER: Int
Equipment attachments that measure a specific metric.
For example: Pedal Meters, Insole Meters
Value: 15
DEVICE_TYPE_PHONE
static val DEVICE_TYPE_PHONE: Int
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.
Value: 2
DEVICE_TYPE_PORTABLE_COMPUTER
static val DEVICE_TYPE_PORTABLE_COMPUTER: Int
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
Value: 14
DEVICE_TYPE_RING
static val DEVICE_TYPE_RING: Int
Wearable devices worn on a finger, typically designed for discreet tracking of sleep, activity, and potentially other physiological data.
Value: 4
DEVICE_TYPE_SCALE
static val DEVICE_TYPE_SCALE: Int
Devices designed to measure body weight and often other body composition metrics.
Value: 3
DEVICE_TYPE_SMART_DISPLAY
static val DEVICE_TYPE_SMART_DISPLAY: Int
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
Value: 8
DEVICE_TYPE_UNKNOWN
static val DEVICE_TYPE_UNKNOWN: Int
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.
Value: 0
DEVICE_TYPE_WATCH
static val DEVICE_TYPE_WATCH: Int
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.
Value: 1
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 |
getManufacturer
fun getManufacturer(): String?
Return | |
---|---|
String? |
The device manufacturer if set, null otherwise |
getModel
fun getModel(): String?
Return | |
---|---|
String? |
The device model if set, null otherwise |
getType
fun getType(): Int
hashCode
fun hashCode(): Int
Returns a hash code value for the object.
Return | |
---|---|
Int |
a hash code value for this object. |