FileDocCategorySizeDatePackage
BluetoothHealthCallback.javaAPI DocAndroid 5.1 API2934Thu Mar 12 22:22:10 GMT 2015android.bluetooth

BluetoothHealthCallback

public abstract class BluetoothHealthCallback extends Object
This abstract class is used to implement {@link BluetoothHealth} callbacks.

Fields Summary
private static final String
TAG
Constructors Summary
Methods Summary
public voidonHealthAppConfigurationStatusChange(BluetoothHealthAppConfiguration config, int status)
Callback to inform change in registration state of the health application.

This callback is called on the binder thread (not on the UI thread)

param
config Bluetooth Health app configuration
param
status Success or failure of the registration or unregistration calls. Can be one of {@link BluetoothHealth#APP_CONFIG_REGISTRATION_SUCCESS} or {@link BluetoothHealth#APP_CONFIG_REGISTRATION_FAILURE} or {@link BluetoothHealth#APP_CONFIG_UNREGISTRATION_SUCCESS} or {@link BluetoothHealth#APP_CONFIG_UNREGISTRATION_FAILURE}


                                                                                                                         
       
              
        Log.d(TAG, "onHealthAppConfigurationStatusChange: " + config + "Status: " + status);
    
public voidonHealthChannelStateChange(BluetoothHealthAppConfiguration config, BluetoothDevice device, int prevState, int newState, android.os.ParcelFileDescriptor fd, int channelId)
Callback to inform change in channel state.

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)

param
config The Health app configutation
param
device The Bluetooth Device
param
prevState The previous state of the channel
param
newState The new state of the channel.
param
fd The Parcel File Descriptor when the channel state is connected.
param
channelId The id associated with the channel. This id will be used in future calls like when disconnecting the channel.

        Log.d(TAG, "onHealthChannelStateChange: " + config + "Device: " + device +
              "prevState:" + prevState + "newState:" + newState + "ParcelFd:" + fd +
              "ChannelId:" + channelId);