Last active
March 19, 2024 20:30
-
-
Save dermatthias/29af809b4f57b245765a to your computer and use it in GitHub Desktop.
Parse Eddystone URL with Android Beacon Library
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// m:2-2=10 for scanning for URL frames (00 = UID, 20 = TLM) | |
BeaconParser eddystoneURLBeaconParser = new BeaconParser().setBeaconLayout("s:0-1=feaa,m:2-2=10,p:3-3:-41,i:4-13,i:14-19"); | |
beaconManager.getBeaconParsers().add(eddystoneURLBeaconParser); | |
//....(search for beacons with didRangeBeaconsInRegion() etc.) | |
String url = new String(beacon.getId1().toByteArray(), "UTF-8"); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment