I currently have a device paired to my smartphone (Micro:Bit BBC). My app has to connect to it, reconnect in case it loses connexion and read from one characteristic that this device provides.
I'm new on Android. I've already read this link Android BLE SDK but I can't understand everything and there are some parts from that code that are missing.
I know how to look for paired devices but I don't know what to do after this:
bleAdapter = ((BluetoothManager) getSystemService(Context.BLUETOOTH_SERVICE)).getAdapter();
Set<BluetoothDevice> pairedDevices = bleAdapter.getBondedDevices();
This shows me the unique device bonded (BBC micro:bit [zogav]). How I can connect to that device, keep the connection alive and reconnect in case the micro:bit gets out of range?