Open doubl3p opened 7 years ago
You can try this method:
ParcelUuid[] uuids = beacon.device.getUuids();
Beacon
class has public final device
field of type BluetoothDevice
.
Reference in Android SDK documentation: https://developer.android.com/reference/android/bluetooth/BluetoothDevice.html#getUuids()
thanks for the fast reply. sadly it's not what i am searching for:
ParcelUuid[] uuids = beacon.device.getUuids();
don't returns the:
and let my application terminate.
beacon.device.toString();
also retuns just the MAC-Address.
After the quick search, I found out that it's not possible to get iBeacon UUID and Eddystone UID just with Android SDK easily. Probably it could be somehow extracted or translated from uuids
or scanRecord
field in Beacon
class. Unfortunately, I don't know how to do that yet. I suppose it may be a custom functionality, which require additional implementation. When I gather more concrete knowledge in this topic, I'll post an update here.
I'm also open for help and suggestions of the other people.
here in this lib:
https://altbeacon.github.io/android-beacon-library/distance-triggering.html
they define a BeaconManager and use BeaconParser to define how to parse the Advertising packet. here e.g. iBeacon format.
beaconManager = BeaconManager.getInstanceForApplication(this); beaconManager.getBeaconParsers().add(new BeaconParser() .setBeaconLayout("m:2-3=0215,i:4-19,i:20-21,i:22-23,p:24-24")); beaconManager.bind(this);
Initial references (code snippets), which can help in the implementation:
iBeacon:
Eddystone:
where can i get:
It would be very helpful.