Scanning Period


#1

beaconManager.setForegroundScanPeriod(1000,1000);

Here in this method what are those two parameters. I guess it takes data every 1 second. But there are two milliseconds. Anyway, can someone clarify, I need to take 5 data in every 2seconds.

Thanks in advance!


#2

Please see the document here


#3

Thank you, but I use toast message to show distances. And toast message’s duration is 1000milisecond. If I change numbers in this method it doesnt show infos synchronised. I use toast message in setRangingListener() which is just 1 line under setForegroundScanPeriod method. I couldn’t understand that method’s usage.(setForegroundScanPeriod)What I need is getting data 2times in one seconds, and showing toast message’s duration 1second. It should be synchronised with the toast’s distance value and listview’s distance value. Thank you!


#4
public void setForegroundScanPeriod(long scanPeriodMillis,long waitTimeMillis)

scanPeriodMillis is the time to scan the devices
waitTimeMillis is the time to sleep
If you need get data 2times in one seconds
You can set setForegroundScanPeriod(500,0)


#5

thanks for your reply!


#6

Thank you so much guys! Appreciate a lot :slight_smile: