7
votes

The Google's Proximity Beacon API documentation uses Eddystone as an example everywhere:

https://developers.google.com/beacons/proximity/register

However, documentation mentions two more types of beacons, AltBeacon and iBeacon.

If I understand correctly, something like this should be used (adapted from Google's example):

 {
  "advertisedId": {
   "type":"IBEACON",
   "id":"base 64 of what???"},
  "status":"ACTIVE",
  "latLng": {
     "latitude": 51.4935657,
     "longitude": -0.1465538
   }
}

However, what is the acceptable binary format for iBeacon's UUID,Major,Minor (which should be base64'd)?

1
Good question. Have you tried concatenating the UUID/major/minor (with spaces, commas or underscores) and Base64 encoding that?davidgyoung
According to docs, it should be binary (bytes), so spaces, etc, are out of question. No, I have not tried yet. This question is in hope someone knows. I will post the answer if/when I will find out.Roman Susi

1 Answers

9
votes

The id of the advertisedId will be the 20 bytes of the iBeacon UUID + major + minor base64 encoded directly from the binary form. (i.e. don't print it out as hex or text first before base64 encoding. Just take the blob and base64 that).

Otherwise your request looks right!