sandeepmistry / node-bleacon

A Node.js library for creating, discovering, and configuring iBeacons
MIT License
498 stars 88 forks source link

Setting scanning interval #33

Closed karthikbnd closed 8 years ago

karthikbnd commented 8 years ago

Hello i am able to scan the beacons without duplicates, but i want to scan the beacons for every 10secs, even if there are same beacons i want to console log them for every 10 sec

for example

Bleacon.startScanning(); //setting interval for this or chage in onDiscover event

sandeepmistry commented 8 years ago

@karthikbnd what have you tried so far?

This should be possible using the startScanning and stopScanning API's in conjunction with setTimeout.

karthikbnd commented 8 years ago

var interval = setInterval(Beacon_scanning, 10000); console.info('Started Scanning........'); function Beacon_scanning(){ Bleacon.startScanning(); }

sandeepmistry commented 8 years ago

@karthikbnd what about the stopScanning API I mentioned in my previous comment?

sandeepmistry commented 8 years ago

Closing due to lack of activity.