public final class HealthSensorProfile
- Object
- HealthSensorProfile
A standard Bluetooth SIG health sensor profile – the service a device advertises and the measurements it produces.
These are the adopted profiles, so any conforming device works without
per-vendor code: a heart-rate strap from any manufacturer speaks
0x180D.
Fields
Methods
public String getName() | The profile’s human-readable name. |
public BluetoothUuid getServiceUuid() | The GATT service UUID a conforming device advertises. |
public BluetoothUuid getMeasurementUuid() | The characteristic carrying this profile’s measurements. |
public List<HealthDataType> getProducedTypes() | The health data types a session with this profile can produce. |
public boolean isStreaming() | true for profiles that notify continuously – heart rate, power, cadence. |
public static List<HealthSensorProfile> values() | Every profile this framework understands. |
public String toString() | Returns a string representation of the object. |
Inherited methods
Field details
HEART_RATE
public static final HealthSensorProfile HEART_RATE0x180D. Streams heart rate and, on most
straps, RR intervals for heart-rate variability.CYCLING_POWER
public static final HealthSensorProfile CYCLING_POWER0x1818. Streams power and, when the meter
reports crank data, cadence.CYCLING_SPEED_CADENCE
public static final HealthSensorProfile CYCLING_SPEED_CADENCECycling Speed and Cadence, service 0x1816. Streams derived speed
and cadence – the raw characteristic carries cumulative counters,
which SensorSession differences for you.
Cycling Speed and Cadence, service 0x1816.
Only cadence is produced. Speed would need a wheel circumference the profile does not carry, and guessing a tyre size scales every distance the app derives – so the wheel block is decoded and discarded rather than published. Advertising SPEED here left apps waiting forever for a sample that never came.
RUNNING_SPEED_CADENCE
public static final HealthSensorProfile RUNNING_SPEED_CADENCE0x1814. Streams speed and step
cadence from a foot pod.HEALTH_THERMOMETER
public static final HealthSensorProfile HEALTH_THERMOMETER0x1809. Reports one measurement at a
time rather than streaming.WEIGHT_SCALE
public static final HealthSensorProfile WEIGHT_SCALE0x181D. Reports one measurement per
weighing.BLOOD_PRESSURE
public static final HealthSensorProfile BLOOD_PRESSURE0x1810. Reports one measurement per
inflation cycle.GLUCOSE
public static final HealthSensorProfile GLUCOSE0x1808. Reports a measurement when the user
tests, and can replay stored records – see
SensorSession.requestStoredRecords(GlucoseRecordFilter).Method details
getName
public String getName()getServiceUuid
public BluetoothUuid getServiceUuid()getMeasurementUuid
public BluetoothUuid getMeasurementUuid()getProducedTypes
public List<HealthDataType> getProducedTypes()isStreaming
public boolean isStreaming()true for profiles that notify continuously – heart rate, power,
cadence. false for episodic ones that report a single reading per
measurement, such as a scale or a blood-pressure cuff.
Worth branching on in UI: a streaming sensor should show a live value, while an episodic one should show “waiting for a measurement” until the user actually takes one.
values
public static List<HealthSensorProfile> values()toString
public String toString()