ZTBleManager
BLE Manager responsible for finding and connecting to peripherals. It can be subscribed to be notified about
- onBluetoothStateChange (Bluetooth state changed)
- onDeviceDiscovered (Device discovered)
- onDeviceStateChange (Device connected / disconnected)
- onDeviceConnectionFailed ()
-
Service to scan for. So peripherals with these services will be discovered.
-
Current state of manager
-
Singleton
-
CBCentralManager instance
-
Mac address to connect obtained from QR code. Mac addess should exist in adverisement data for connection.
-
ZTDeviceInfo
-
Service types to support
-
Connect to certain product type
-
Connected device
-
Found CBPeripheral
-
Indicates if scanning is in progress
-
Is DFU mode
-
Bluetooth changed state event
-
Device connection state change event
-
Device discovered event
-
Device connection failed event
-
Scan finished event
-
Device reconnection failed event
-
ZT_NOTIFY - MSG_GENERAL_STATES changed observer
-
ZT_NOTIFY command acknowledged response observer