I'm having this onScanFailed
error code on some devices (LG to be more detailed) when discovering BLE devices on android. The code works as expected on another devices. How can i fix it?
I use BLE API 21+ and the following code to discover:
ScanSettings scanSettings = new ScanSettings.Builder()
.setScanMode(ScanSettings.SCAN_MODE_LOW_LATENCY)
.setReportDelay(discoveryDelay)
.build();
Here are the full sources: https://github.com/4ntoine/protobuf-ble-rpc/blob/hi-p/android/client/src/main/java/com/googlecode/protobuf/blerpc/BleRpcConnectionFactory.java#L362
.setScanMode(ScanSettings.SCAN_MODE_LOW_LATENCY)