Reputation: 23
I'm currently working on an app on Android which detects iBeacons
using the API provided by Kontakt
, to execute actions configured online in the Kontakt CMS
.
However, to detect beacons, I am using the Radius Networks BLE
libraries. I was unable to extract the UUID from the beacons, is this feature only available in the Pro Library? If it is available for the Open Source Library, how do I detect beacons with their UUID?
Upvotes: 2
Views: 2646
Reputation: 64941
Yes, you can do this with the open source Android iBeacon Library.
First, make sure your beacons are transmitting properly by verifying you can detect therm with the free iBeacon Locate app.
If this works, take a look at the "Ranging Example Code" here, which shows how to read the beacon ids.
EDIT: This library has been replaced by one with a the Android Beacon Library 2.0. The Ranging example is now available here.
Upvotes: 0
Reputation: 618
Region region = new Region("myRangingUniqueId", uUID, null, null);
Should be able to range for that to get a list of beacons matching that uuid from didRangeBeaconsInRegion callback.
Unless you just want to range for all beacons, then you can leave the proxUuid field null (wildcard) and then iterate through and get the proxIds with iBeacons.iterator().next().getProximity()
Upvotes: 1