Z T Ble Manager
object ZTBleManager
Content copied to clipboard
This class is responsible for getting BLE device through a given MAC address or QRCode data. The class ensures that there is only one active device, as the SDK does handle only one active connection at a time for now. BLE scanning is done through this class. You can also listen for general BLE events.
Author
Alexandre Lemoult <a.lemoult@zhortech.com>
Functions
connectToDevice
Link copied to clipboard
getBleDeviceWithCode
Link copied to clipboard
getConnectedDevices
Link copied to clipboard
getProduct
Link copied to clipboard
invoke
Link copied to clipboard
operator fun invoke(context: Context, product: ZTBaseProduct): ZTBleManager
Content copied to clipboard
reconnectLastDevice
Link copied to clipboard
scanForDevices
Link copied to clipboard
fun scanForDevices(duration: Long? = null, timeUnit: TimeUnit? = null): Observable<ZTScanRecord>
Content copied to clipboard
scanForProduct
Link copied to clipboard
fun scanForProduct(productType: ZTProductType, duration: Long? = null, timeUnit: TimeUnit? = null): Observable<ZTScanRecord>
Content copied to clipboard
Properties
onBluetoothStateChange
Link copied to clipboard