问题
I am currently exploring retail advertising options. I am interested in AltBeacon as it is an open standard. I have a basic question, if someone can answer
How to programmatically scan nearby AltBeacons in both (i) central iOS and (ii) central Android devices, and programmatically parse or get RSSI/signal strength, UUID, major ID, minor ID and RSSI at 1 meter? It seems that, Locate App is successfully doing that
回答1:
For Android, the Android Beacon Library does exactly what you say with its accompanying reference app. It sets up a wildcard beacon Region to match all AltBeacon instances, and print out how many it sees. The identifiers and other beacon fields are not printed out, but this can be easily added to RangingActivity.java with beacon.getId1(), beacon.getId2(), beacon.getId3(). For the RSSI at one meter, use beacon.getTxPower().
The iOS Beacon Tools repo provides equivalent functionality for reading AltBeacon on that platform. The README provides examples on how to read the same fields as described above.
来源:https://stackoverflow.com/questions/52048848/how-to-programmatically-scan-nearby-altbeacons