Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

iBeacon UUID and Eddystone UID #54

Open
doubl3p opened this issue Feb 16, 2017 · 5 comments
Open

iBeacon UUID and Eddystone UID #54

doubl3p opened this issue Feb 16, 2017 · 5 comments

Comments

@doubl3p
Copy link

doubl3p commented Feb 16, 2017

where can i get:

  • iBeacon UUID
  • Eddystone UID

It would be very helpful.

@pwittchen
Copy link
Owner

pwittchen commented Feb 16, 2017

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()

@doubl3p
Copy link
Author

doubl3p commented Feb 16, 2017

thanks for the fast reply. sadly it's not what i am searching for:

ParcelUuid[] uuids = beacon.device.getUuids();
don't returns the:

  • iBeacon UUID like: 2f234454-cf6d-4a0f-adf2-f4911ba9ffa6
  • Eddystone UID-Namespace like: 0x2f234454f4911ba9ffa6

and let my application terminate.

beacon.device.toString();
also retuns just the MAC-Address.

@pwittchen
Copy link
Owner

pwittchen commented Feb 16, 2017

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.

@doubl3p
Copy link
Author

doubl3p commented Feb 17, 2017

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);

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants