I'm trying to know what floor I'm at by getting the distance of 2 beacons with the same id1,1d2 and the id3 is 1 for beacon 1 and 2 for beacon 2...but my code does not work :( ... Im not that good in programming and I dont know how to use most of the functions or methods of altbeacon .... can someone help me how to get distance of beacons and make a condtion base on that distances of 2 beacons .... Is there a sample codes in doing this?
public void didRangeBeaconsInRegion(Collection<Beacon> beacons, Region region) {
if((beacon.getId3().equals(Identifier.parse("1")) && beacon.getDistance() < 0.5) && (beacon.getDistance() > 5 && beacon.getId3().equals(Identifier.parse("2"))
logToDisplay("1st floor");
}
}