ScanSettings.CALLBACK_TYPE_ALL_MATCHES not working

1.4k views Asked by At

I have given reading to understand and try BLE scanning filter issue from here. and finally I found ScanSettings.CALLBACK_TYPE_ALL_MATCHES that say "Trigger a callback for every Bluetooth advertisement found that matches the filter criteria" but problem remain same. For mention device here it still filtering duplicate advertise packet.

Any suggestion if any specific filter need to apply.

Following I tried:

ScanFilter deviceFilter = new ScanFilter.Builder().setDeviceName("my_device_name").build();

                settings = new ScanSettings.Builder()
                        .setScanMode(ScanSettings.CALLBACK_TYPE_ALL_MATCHES)
                        .build();
                filters = new ArrayList<>();
                filters.add(deviceFilter);

                mLEScanner.startScan(filters, settings, mScanCallback);
1

There are 1 answers

0
Adam Tegen On

Try .setCallbackType(ScanSettings.CALLBACK_TYPE_ALL_MATCHES)