dotintent / FlutterBleLib

Bluetooth Low Energy library for Flutter with support for simulating peripherals
Apache License 2.0
537 stars 197 forks source link

[Question] How to subscribe to bond state for a BLE device? #611

Open letsgitgoin opened 3 years ago

letsgitgoin commented 3 years ago

On Android, how are you guys subscribing to bond state of a BLE device. The device bond state changes to bonded(BOND_BONDED) after the pairing request has been acknowledged/accepted on the phone/tablet by the user. How are you guys waiting for the user to acknowledge the request before proceeding with further communication? In native Android one can subscribe to broadcast action ACTION_BOND_STATE_CHANGED, trying to find a way to do the same in Flutter. Any suggestions will be appreciated. Thank You.