EddystoneUid

public classEddystoneUidextendsObject

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(StringhexId)
Creates an ID.
EddystoneUid(String hexNamespace,StringhexInstance)
Creates an ID.

Public Method Summary

boolean
staticEddystoneUid
from(Message message)
Converts a Message of type Message.MESSAGE_TYPE_EDDYSTONE_UIDto 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
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

publicEddystoneUid(StringhexId)

Creates an ID.

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

publicEddystoneUid(StringhexNamespace,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 booleanequals(Objecto)

public staticEddystoneUid from(Message message)

publicStringgetHex()

Returns the 16-byte ID, as a hex string.

publicStringgetInstance()

Returns the instance (last 6 bytes), as a hex string.

publicStringgetNamespace()

Returns the namespace (first 10 bytes), as a hex string.

public inthashCode()

publicStringtoString()