IBeacon Ranging Service Not Returning Any Beacons (Part 2)
My code has now reached checkpoint 1 and 2. However, it is only detecting the beacon once. I want it to keep receiving the location of the beacon (distance) every five seconds. How
Solution 1:
I recommend you remove the Handler and the Thread as they seem unnecessary here.
I think all you need do is remove the Handler and the Thread, and run beaconManager.setForegroundScanPeriod as follows. Additionally, as best active you should probably bind the BeaconManager after setting all of its properties.
beaconManager.getBeaconParsers().clear();
beaconManager.getBeaconParsers().add(new BeaconParser().
setBeaconLayout("m:2-3=0215,i:4-19,i:20-21,i:22-23,p:24-24,d:25-25"));
beaconManager.setForegroundScanPeriod(5285);
beaconManager.bind(this);
Post a Comment for "IBeacon Ranging Service Not Returning Any Beacons (Part 2)"