Android-Scanner-Compat-Library icon indicating copy to clipboard operation
Android-Scanner-Compat-Library copied to clipboard

Scan for nearby deivce with onBatchScanResults results list is empty

Open talfsaverone opened this issue 1 year ago • 2 comments

When scanning for the nearby devices I saw the following issue:

The onBatchScanResults returns an empty list while the onScanResult returns results.

My configuration is:

ScanSettings.Builder()
        .setScanMode(ScanSettings.SCAN_MODE_BALANCED)
        .setReportDelay(5000L)
        .setUseHardwareBatchingIfSupported(false)
        .setUseHardwareFilteringIfSupported(false)
        .setLegacy(false)
        .build()

talfsaverone avatar May 30 '24 13:05 talfsaverone

Hmm.. intersting. What if you set setUseHardwareBatchingIfSupported(true)?

philips77 avatar Jun 04 '24 14:06 philips77

We saw from the comments in the code that it might have issues in some older devices so we haven't used it in our project but we were able to reproduce it with true as well.

Although it is tricky to reproduce this issue our product requires it to work 100% of the time, so what could be our alternative?

talfsaverone avatar Jun 05 '24 19:06 talfsaverone