How to detect when a BLE device is not in range anymore?
I use a LeScanCallback (can not use the newer scan methods because I'm developing for api 18. Not that it matters, since the android 5.0+ apis don't offer this functionality either) to detect when a nearby BLE device is detected: private BluetoothAdapter.LeScanCallback bleCallback = new BluetoothAdapter.LeScanCallback() { @Override public void onLeScan(BluetoothDevice bluetoothDevice, int i, byte[] bytes) { discoveredDevices.add(bluetoothDevice); } }; I am not pairing or connecting with the devices because that's not required, I simply want to see which devices are nearby. I'm trying to make a