AI-generated Key Takeaways
-
Eddystone UID is broadcast by BLE beacons.
-
An Eddystone UID has a defined length of 16 bytes, consisting of a 10-byte namespace and a 6-byte instance.
-
You can create an Eddystone UID using a 16-byte hex ID string or separate hex strings for the namespace and instance.
-
Methods are available to retrieve the full hex ID, the namespace, and the instance as hex strings, and to convert a
Messageof typeMessage.MESSAGE_TYPE_EDDYSTONE_UIDto anEddystoneUid.
An Eddystone UID, broadcast by BLE beacons.
See Also
Constant Summary
| int | INSTANCE_LENGTH | Length of an Eddystone UID instance, in bytes. |
| int | LENGTH | Length of an Eddystone UID, in bytes. |
| int | NAMESPACE_LENGTH | Length of an Eddystone UID namespace, in bytes. |
Public Constructor Summary
Public Method Summary
| boolean | |
| static EddystoneUid |
from(Message
message)
Converts a Message of type
Message.MESSAGE_TYPE_EDDYSTONE_UID to an EddystoneUid.
|
| String |
getHex()
Returns the 16-byte ID, as a hex string.
|
| String |
getInstance()
Returns the instance (last 6 bytes), as a hex string.
|
| String |
getNamespace()
Returns the namespace (first 10 bytes), as a hex string.
|
| int |
hashCode()
|
| String |
toString()
|
Inherited Method Summary
Constants
public static final int INSTANCE_LENGTH
Length of an Eddystone UID instance, in bytes.
public static final int LENGTH
Length of an Eddystone UID, in bytes. An Eddystone UID consists of a 10-byte namespace, followed by a 6-byte instance.
public static final int NAMESPACE_LENGTH
Length of an Eddystone UID namespace, in bytes.
Public Constructors
public EddystoneUid (String hexId)
Creates an ID.
Parameters
| hexId | Hex representation of a 16-byte ID (namespace plus instance). |
|---|
Public Methods
public boolean equals (Object o)
public static EddystoneUid from (Message message)
Converts a Message of type
Message.MESSAGE_TYPE_EDDYSTONE_UID to an EddystoneUid.
public String getHex ()
Returns the 16-byte ID, as a hex string.
public String getInstance ()
Returns the instance (last 6 bytes), as a hex string.
public String getNamespace ()
Returns the namespace (first 10 bytes), as a hex string.