'Difference between onBatchScanResult vs OnScanResult in Bluetooth Low Energy Android (Ble Scanner)

To perform scanning we need BluetoothAdapter and it's scanner. Docs:

https://developer.android.com/reference/android/bluetooth/le/BluetoothLeScanner#startScan(android.bluetooth.le.ScanCallback)

for startScan() a callback must be Implemented, moreover this callback provides 3 public methods.

https://developer.android.com/reference/android/bluetooth/le/ScanCallback#public-methods_1

I don't get the difference between onScanResult and onBatchScanResults What's the purpose of the second one? And when would be it's typical use-case? Or when I would have to use it instead of onScanResult



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source