I have been going around in circles for the last few days on BLE device connectivity, I have been following the examples and structure for using BLE within Xamarin (using the command structure below). The question is how to manage re-bonding devices automatically to a mobile app and the best way to structure the code and functionality. I have the following questions on a suitable strategy
Is it possible to setup a state change on a device present/not-present, to help auto-connect pre-bond devices?
Or should BLE do it all in the background and just missing something on the setup process
[IBluetoothLE].StateChanged => To know the Bluetooth status, like its off/on (Check BT is switch on)
[IAdapter].DeviceDiscovered => This will trigger when any device is discovered (Search for suitable device)
[IAdapter].ConnectToDeviceAsync => For connecting with a device (Bond to a device)
BT Data transfer Tx/Rx while device is connected
How to auto-rebond the device back to the mobile app?
1) Period timer to scan for known devices and re-connect?
2) State change on the device?
3) A method to trigger a re-connection?