智能客服
你问我答,随时在线为你解决问题

























此版本文档已归档不再维护,推荐您使用最新版本。
| CLASS info |
| public class BeaconId extends Object |
| Beacon ID(BLE广播,包括iBeacon和Eddystone). |
| Type | Name | Desc |
| Class | BeaconId.Builder | BeaconId的构造类 |
| Type | Name | Desc |
| int | BEACON_TYPE_IBEACON | IBEACON UUID类型 |
| int | BEACON_TYPE_EDDYSTONE_UID | Eddystone UID类型 |
| int | IBEACON_ID_LENGTH | iBeacon ID的长度,单位:字节 |
| int | EDDYSTONE_UID_LENGTH | Eddystone UID的长度,单位:字节 |
| int | EDDYSTONE_NAMESPACE_LENGTH | Eddystone UID namespace的长度,单位:字节 |
| int | EDDYSTONE_INSTANCE_LENGTH | Eddystone UID实例的长度,单位:字节 |
| Return | Method |
| int | getLength() 获取Beacon ID的长度 |
| int | getType() 获取iBeacon类型 |
| boolean | equals(Object other) 判断其他对象是否与本实例相同 |
| BeaconId | parse(Message message) 将Message类型转换成BeaconId |
| int | hashCode() 获取hash值 |
| String | toString() 把对象转化成可读的字符串 |
| String | getHex() 返回16字节ID |
| String | getInstance() BeaconID类型为Eddystone时,返回instance(最后6个字节) |
| String | getNamespace() BeaconID类型为Eddystone时,返回namespace(开始的10个字节) |
| short | getMajor() BeaconID类型为iBeacon时,返回major值 |
| short | getMinor() BeaconID类型为iBeacon时,返回minor值 |
| UUID | getIBeaconUuid() BeaconID类型为iBeacon时,返回UUID |
| Constant |
| public static final int BEACON_TYPE_IBEACON |
| IBEACON UUID类型。 Constant Value:1 |
| Constant |
| public static final int BEACON_TYPE_EDDYSTONE_UID |
| Eddystone UID类型。 Constant Value:2 |
| Constant |
| public static final int IBEACON_ID_LENGTH |
| iBeacon ID的长度,单位:字节,一个iBeacon ID包含16字节的UUID,紧接着是2个字节major值,然后是2字节minor值。 Constant Value:20 |
| Constant |
| public static final int EDDYSTONE_UID_LENGTH |
| Eddystone UID的长度,单位:字节,一个Eddystone UID包含10个字节namespace,紧接着是6个字节instance。 Constant Value:16 |
| Constant |
| public static final int EDDYSTONE_NAMESPACE_LENGTH |
| Eddystone UID namespace的长度,单位:字节。 Constant Value:10 |
| Constant |
| public static final int EDDYSTONE_INSTANCE_LENGTH |
| Eddystone UID instance的长度,单位:字节。 Constant Value:6 |
| Method |
| public int getLength() |
| 获取Beacon ID的长度,如果是iBeacon类型则返回BEACON_TYPE_IBEACON,Eddystone类型则返回BEACON_TYPE_EDDYSTONE_UID。 |
| Method |
| public int getType() |
| 获取Beacon ID类型。 iBeacon类型:BEACON_TYPE_IBEACON Eddystone类型:BEACON_TYPE_EDDYSTONE_UID |
| Method |
| public boolean equals(Object other) |
| 判断其他对象是否与本实例相同。 |
Parameters
| Parameter name | Parameter desc |
| other | 其他对象 |
| Method |
| public static BeaconId parse(Message message) |
| 将Message类型转换成BeaconId。 |
Parameters
| Parameter name | Parameter desc |
| message | message对象 |
| Method |
| public int hashCode() |
| 获取hash值。 |
| Method |
| public String toString() |
| 把对象转化成可读的字符串。 |
| Method |
| public String getHex() |
| 返回16字节Beacon ID。 |
| Method |
| public String getInstance() |
| BeaconID类型为Eddystone时,返回instance(最后6个字节)。 |
| Method |
| public String getNamespace() |
| BeaconID类型为Eddystone时,返回namespace(开始的10个字节)。 |
| Method |
| public short getMajor() |
| BeaconID类型为iBeacon时,返回major值。 |
| Method |
| public short getMinor() |
| BeaconID类型为iBeacon时,返回minor值。 |
| Method |
| public UUID getIBeaconUuid() |
| BeaconID类型为iBeacon时,返回UUID。 |
智能客服
你问我答,随时在线为你解决问题
合作咨询
我们的专家服务团队将竭诚为您提供专业的合作咨询服务
解决方案
精准高效的一站式服务支持,助力开发者商业成功