public abstract class BluetoothHealthCallback extends Object
BluetoothHealth
callbacks.Constructor and Description |
---|
BluetoothHealthCallback() |
Modifier and Type | Method and Description |
---|---|
void |
onHealthAppConfigurationStatusChange(BluetoothHealthAppConfiguration config,
int status)
Callback to inform change in registration state of the health
application.
|
void |
onHealthChannelStateChange(BluetoothHealthAppConfiguration config,
BluetoothDevice device,
int prevState,
int newState,
ParcelFileDescriptor fd,
int channelId)
Callback to inform change in channel state.
|
public void onHealthAppConfigurationStatusChange(BluetoothHealthAppConfiguration config, int status)
This callback is called on the binder thread (not on the UI thread)
config
- Bluetooth Health app configurationstatus
- Success or failure of the registration or unregistration
calls. Can be one of
BluetoothHealth.APP_CONFIG_REGISTRATION_SUCCESS
or
BluetoothHealth.APP_CONFIG_REGISTRATION_FAILURE
or
BluetoothHealth.APP_CONFIG_UNREGISTRATION_SUCCESS
or
BluetoothHealth.APP_CONFIG_UNREGISTRATION_FAILURE
public void onHealthChannelStateChange(BluetoothHealthAppConfiguration config, BluetoothDevice device, int prevState, int newState, ParcelFileDescriptor fd, int channelId)
Its the responsibility of the implementor of this callback to close the parcel file descriptor when done. This callback is called on the Binder thread (not the UI thread)
config
- The Health app configutationdevice
- The Bluetooth DeviceprevState
- The previous state of the channelnewState
- The new state of the channel.fd
- The Parcel File Descriptor when the channel state is connected.channelId
- The id associated with the channel. This id will be used
in future calls like when disconnecting the channel.