EddystoneUid

public class EddystoneUid extends Object

An Eddystone UID, broadcast by BLE beacons.

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

EddystoneUid(String hexId)
Creates an ID.
EddystoneUid(String hexNamespace, String hexInstance)
Creates an ID.

Public Method Summary

boolean
static EddystoneUid
from(Message message)
Converts a Message of type MESSAGE_TYPE_EDDYSTONE_UID to an EddystoneUid.
String
String
String
int
String

Inherited Method Summary

Constants

public static final int INSTANCE_LENGTH

Length of an Eddystone UID instance, in bytes.

Constant Value: 6

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.

Constant Value: 16

public static final int NAMESPACE_LENGTH

Length of an Eddystone UID namespace, in bytes.

Constant Value: 10

Public Constructors

public EddystoneUid (String hexId)

Creates an ID.

Parameters
hexId Hex representation of a 16-byte ID (namespace plus instance).

public EddystoneUid (String hexNamespace, String hexInstance)

Creates an ID.

Parameters
hexNamespace Hex representation of a 10-byte namespace.
hexInstance Hex representation of a 6-byte instance.

Public Methods

public boolean equals (Object o)

public static EddystoneUid from (Message message)

Converts a Message of type 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.

public int hashCode ()

public String toString ()