Skip to main content

BLE SDK

Core module that provides low-level API for connecting to Corsano bracelets, performing commands on the bracelet, and getting raw data.

Main interfaces

The main entry point of BLE SDK is interface BleSdk. Its instance can be obtained by calling BleSdk.getInstance(). This method will always return the same (singleton) instance, so it is safe to keep a reference to it in the scope of your app.

Note: Make sure that CosranoSdk.initialize() is called before accessing any other methods.

BleSdk – API surface of the BLE module, which provides access to other interfaces listed in the table below.

InterfaceDescriptionHow to obtain
BleScannerAn abstraction around Android BLE Scanner for performing Corsano device lookup.BleSdk.getScanner()
BleDeviceRepresents physical Bluetooth device (bracelet) and provides methods for interaction with it.BleSdk.getDevice(address)
BleRequestRepresents an intent to execute a command on the bracelet. Contains a command ID and parameters.Create using public constructor, e.g. GetBatteryLevelRequest()
BleCommandRepresents an executable command.BleDevice.newCommand(request)
BleFileTransferSpecial type of BleCommand for data streaming.BleDevice.newFileTransfer(request)
NotificationSourceInterface for listening to Notifications from the device.BleDevice.notifications
BluetoothUtility interface for working with Android BluetoothAdapterBleSdk.getBluetooth()