public interface LegoBluetoothDeviceManagerCallbackListener
Modifier and Type | Method and Description |
---|---|
void |
onDeviceDidAppear(LegoBluetoothDevice bluetoothDevice)
Invoked when a Bluetooth device advertising a LEGO Device service UUID is discovered.
|
void |
onDeviceDidDisappear(LegoBluetoothDevice bluetoothDevice)
Invoked when a Bluetooth device stops advertising a LEGO Device service.
|
void |
onDidDisconnectFromDevice(LegoBluetoothDevice device,
boolean autoReconnect,
LDSDKError error)
Invoked when a device is disconnected.
|
void |
onDidFailToConnectToDevice(LegoBluetoothDevice device,
boolean autoReconnect,
LDSDKError error)
Invoked when a device fails to connect, of if a connection request times out.
|
void |
onDidFinishInterrogatingDevice(LegoBluetoothDevice device)
Invoked when a connection to a device is established and all required services has been discovered.
|
void |
onDidStartInterrogatingDevice(LegoBluetoothDevice device)
Invoked when a connection to a device is established, and the interrogation of the device for required services begins.
|
void |
onWillStartConnectingToDevice(LegoBluetoothDevice device)
Invoked when starting a device connect attempt.
|
void onDeviceDidAppear(LegoBluetoothDevice bluetoothDevice)
bluetoothDevice
- The discovered devicevoid onDeviceDidDisappear(LegoBluetoothDevice bluetoothDevice)
bluetoothDevice
- The device that stopped advertisingvoid onWillStartConnectingToDevice(LegoBluetoothDevice device)
LegoDeviceManager.connectToDevice(android.content.Context, dk.lego.devicesdk.device.LegoDevice)
.
However, it may also happen in relation to an automatic reconnect attempt.device
- The device to establish a connection tovoid onDidFailToConnectToDevice(LegoBluetoothDevice device, boolean autoReconnect, LDSDKError error)
device
- The device that failed to connectautoReconnect
- true if an automatic reconnect will be attempted, see LegoDeviceManager.isAutomaticReconnectOnConnectionLostEnabled()
.error
- The cause of the failure.void onDidDisconnectFromDevice(LegoBluetoothDevice device, boolean autoReconnect, LDSDKError error)
device
- The disconnected deviceautoReconnect
- true if an automatic reconnect will be attempted, see LegoDeviceManager.isAutomaticReconnectOnConnectionLostEnabled()
.error
- If an error occurred, the cause of the failure.void onDidStartInterrogatingDevice(LegoBluetoothDevice device)
device
- The connected devicevoid onDidFinishInterrogatingDevice(LegoBluetoothDevice device)
device
- The connected device