evothings / cordova-ble

Bluetooth Low Energy plugin for Cordova
http://www.evothings.com/
Apache License 2.0
242 stars 103 forks source link

startScan() only lists device once #139

Open rms95 opened 7 years ago

rms95 commented 7 years ago

I am trying to use evothings cordova-ble for scanning beacons which use advertising packets as periodic broadcasts.

At this point I only get a scan result once per device, not every advertisement packet, but I need it every packet. Some other (non-Cordova) libraries by Evothings do allow this via a parameter for the startscan function. Is it possible to do this at the Cordova platform as well? (I am talking about allowDuplicates in https://evothings.com/doc/lib-doc/evothings.easyble.html#.ScanOptions)

My code:

evothings.ble.startScan(
    function(device) {

    },
    function(errorCode) {

    }, {
        allowDuplicates: true
    }
);

I'm using Android 6.0.1 with custom Bluetooth beacons.