Google的Proximity Beacon API文档在任何地方都以Eddystone为例:
https://developers.google.com/beacons/proximity/register
然而,documentation mentions two more types of beacons,AltBeacon和iBeacon。
如果我理解正确,应该使用类似的东西(改编自谷歌的例子):
{
"advertisedId": {
"type":"IBEACON",
"id":"base 64 of what???"},
"status":"ACTIVE",
"latLng": {
"latitude": 51.4935657,
"longitude": -0.1465538
}
}
但是,iBeacon的UUID,Major,Minor(应该是base64'd)的可接受的二进制格式是什么?
答案 0 :(得分:10)
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!