cordova-plugin-bluetoothle icon indicating copy to clipboard operation
cordova-plugin-bluetoothle copied to clipboard

allowDuplicates does not even filter out same device.

Open khayargoli opened this issue 6 years ago • 5 comments

The field allowDuplicates: false is not filtering out same detected BT device.

khayargoli avatar Aug 04 '19 15:08 khayargoli

Please provide more details: operating system, phone, example code, etc

randdusing avatar Aug 04 '19 20:08 randdusing

  • oneplus 6 running Android P
  • code is same from the docs with allowDuplicates set to false.

I am from my phone so cannot share the code sorry.

khayargoli avatar Aug 05 '19 03:08 khayargoli

Please share the code when you can. It could be a side effect of the phone or Android version

randdusing avatar Aug 09 '19 00:08 randdusing

I confirm this is happening on Android (while on iOS works correctly).

Phone: Huawei Y6 2019 (MRD-LX1) Android Version: 9

Basic code used:

bluetoothle.startScan(function(s) {
    console.log(['SUCCESS', s]);
}, function(e) {
    console.log(['ERROR', e]);
}, {
    "allowDuplicates": false
});

Results in endless duplicates of the same device...

adelin-mcbsoft avatar Jan 16 '21 08:01 adelin-mcbsoft

As per my basic code understanding, there isn't any implementation at all regarding allowDuplicates in the Android's BluetoothLePlugin.java file (meaning a quick search for this tag finds nothing, while it can be found in the iOS's BluetoothLePlugin.m file).

So I guess it was just forgotten... wish it'd be a quick feature to implement.

adelin-mcbsoft avatar Jan 16 '21 08:01 adelin-mcbsoft