| CLASS info |
| public class BeaconId extends Object |
| Represents the beacon ID, which can either be an iBeacon ID or an Eddystone UID. The ID is broadcast by BLE beacons. |
| Type | Name | Desc |
| Class | BeaconId.Builder | Represents the builder class for BeaconId. |
| Type | Name | Desc |
| int | BEACON_TYPE_IBEACON | iBeacon ID type. |
| int | BEACON_TYPE_EDDYSTONE_UID | Eddystone UID type. |
| int | IBEACON_ID_LENGTH | Length of an iBeacon ID, in bytes. |
| int | EDDYSTONE_UID_LENGTH | Length of an Eddystone UID, in bytes. |
| int | EDDYSTONE_NAMESPACE_LENGTH | Length of an Eddystone UID namespace, in bytes. |
| int | EDDYSTONE_INSTANCE_LENGTH | Length of an Eddystone UID instance, in bytes. |
| Return | Method |
| int | getLength() Obtains the length of a beacon ID. |
| int | getType() Obtains the beacon ID type. |
| boolean | equals(Object other) Checks whether any other object is the same as this object. |
| BeaconId | parse(Message message) Converts a message to a beacon ID. |
| int | hashCode() Obtains the hash value. |
| String | toString() Converts an object into a readable character string. |
| String | getHex() Returns a 16-byte beacon ID. |
| String | getInstance() Returns the instance (last 6 bytes) of an Eddystone UID. |
| String | getNamespace() Returns the namespace (first 10 bytes) of an Eddystone UID. |
| short | getMajor() Returns the major value of an iBeacon ID. |
| short | getMinor() Returns the minor value of an iBeacon ID. |
| UUID | getIBeaconUuid() Returns the UUID of an iBeacon ID. |
| Constant |
| public static final int BEACON_TYPE_IBEACON |
| IBEACON UUID type. Constant value: 1 |
| Constant |
| public static final int BEACON_TYPE_EDDYSTONE_UID |
| Eddystone UID type. Constant value: 2 |
| Constant |
| public static final int EDDYSTONE_UID_LENGTH |
| Length of an Eddystone UID, in bytes. An Eddystone UID contains a 10-byte namespace, followed by a 6-byte instance. Constant value: 16 |
| Constant |
| public static final int EDDYSTONE_NAMESPACE_LENGTH |
| Length of an Eddystone UID namespace, in bytes. Constant value: 10 |
| Constant |
| public static final int EDDYSTONE_INSTANCE_LENGTH |
| Length of an Eddystone UID namespace, in bytes. Constant value: 6 |
| Method |
| public int getLength() |
| Obtains the length of a beacon ID. IBEACON_ID_LENGTH is returned for an iBeacon ID and EDDYSTONE_UID_LENGTH is returned for an Eddystone UID. |
| Method |
| public int getType() |
| Obtains the beacon ID type. For an iBeacon ID, BEACON_TYPE_IBEACON is returned. For an Eddystone UID, BEACON_TYPE_EDDYSTONE_UID is returned. |
| Method |
| public boolean equals(Object other) |
| Checks whether any other object is the same as this object. |
Parameters
| Parameter name | Parameter desc |
| other | Other object. |
| Method |
| public static BeaconId parse(Message message) |
| Converts a message to a beacon ID. |
Parameters
| Parameter name | Parameter desc |
| message | Message object. |
| Method |
| public int hashCode() |
| Obtains the hash value. |
| Method |
| public String toString() |
| Converts an object into a readable character string. |
| Method |
| public String getHex() |
| Returns a 16-byte beacon ID. |
| Method |
| public String getInstance() |
| Returns the instance (last 6 bytes) of an Eddystone UID. |
| Method |
| public String getNamespace() |
| Returns the namespace (first 10 bytes) of an Eddystone UID. |
| Method |
| public short getMajor() |
| Returns the major value of an iBeacon ID. |
| Method |
| public short getMinor() |
| Returns the minor value of an iBeacon ID. |
| Method |
| public UUID getIBeaconUuid() |
| Returns the UUID of an iBeacon ID. |