MeasureCallback
interface MeasureCallback
Callback for MeasureClient.registerMeasureCallback.
Summary
Public functions |
|
|---|---|
Unit |
onAvailabilityChanged(Called when the availability of a |
Unit |
onDataReceived(data: DataPointContainer)Called when new data is available. |
open Unit |
Called when this callback has been successfully registered with Health Services. |
open Unit |
onRegistrationFailed(throwable: Throwable)Called when Health Services reports a failure with the registration of this callback. |
Public functions
onAvailabilityChanged
fun onAvailabilityChanged(
dataType: DeltaDataType<*, *>,
availability: Availability
): Unit
Called when the availability of a DataType changes.
| Parameters | |
|---|---|
dataType: DeltaDataType<*, *> |
the |
availability: Availability |
the new |
onDataReceived
fun onDataReceived(data: DataPointContainer): Unit
Called when new data is available. Data may be batched.
| Parameters | |
|---|---|
data: DataPointContainer |
the (potentially batched) set of measured |
onRegistered
open fun onRegistered(): Unit
Called when this callback has been successfully registered with Health Services.
onRegistrationFailed
open fun onRegistrationFailed(throwable: Throwable): Unit
Called when Health Services reports a failure with the registration of this callback. Common causes include: the calling app lacks the necessary permission, or the device does not support the requested DataType.
| Parameters | |
|---|---|
throwable: Throwable |
a throwable sent by Health Services with information about the failure |