IBluetooth LEConnection Status Changed
IBluetoothLEConnectionStatusChanged
Description :
This interface represent the API for all actions/event related to Bluetooth LE. This interface is used with the STWBLEManager in order to delegate event linked to bluetooth LE.
Example of use :
- Implementation :
IBluetoothLEConnectionStatusChanged mBluetoothLeConnectionStatusChanged = new IBluetoothLEConnectionStatusChanged() { public void onConnectionStatusChanged(int connectionStatus) { // code ... } public void onBLEConnectionStopped() { // code ... } public void onBLEConnectionSuccess(BluetoothDevice bluetoothDevice) { // code ... } }Content copied to clipboard - Registration :
STWBLEManager.getInstance().registerBluetoothConnexionStatusChanged(context, mBluetoothLeConnectionStatusChanged);Content copied to clipboard - Unregister :
STWBLEManager.getInstance().unregisterBluetoothLEStatusChanged( mBluetoothLeConnectionStatusChanged);Content copied to clipboard
Functions
Link copied to clipboard
Callback triggered when ble device is disconnect
Link copied to clipboard
Callback triggered when connection is Stopped
Link copied to clipboard
abstract fun onBLEConnectionSuccess(@Nullable bluetoothDevice: BluetoothDevice)
Content copied to clipboard
Callback triggered when connection is Established.
Link copied to clipboard
Callback triggered when Bluetooth connection status is changed Connection status can be :