I’m creating simple application to discover beacons nearby me.
I’m using this plugin https://github.com/don/cordova-plugin-ble-central to handle BLE.
There are two methods:
ble.startScan(services, success, failure);
ble.startScanWithOptions(services, options, success, failure);
When I use ble.startScan I can only discover beacon once. Even when I turn off/on beacon, application didn’t “discover” beacon again.
ble.startScanWithOption have got flag reportDuplicates and when I enable this flag I can see that beacon is discovered again and again.
My question is how to detect beacon once and monitor if it is still in my range? It is possible to check for eg. every 5 sec if I’m still in beacon range?