public class

EddystoneUid

extends Object
java.lang.Object
   ↳ com.google.android.gms.nearby.messages.EddystoneUid

Class Overview

An Eddystone UID, broadcast by BLE beacons.

See also:

Summary

Constants
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 Constructors
EddystoneUid(String hexId)
Creates an ID.
EddystoneUid(String hexNamespace, String hexInstance)
Creates an ID.
Public Methods
boolean equals(Object o)
static EddystoneUid from(Message message)
Converts a Message of type MESSAGE_TYPE_EDDYSTONE_UID to an EddystoneUid.
String getHex()
String getInstance()
String getNamespace()
int hashCode()
String toString()
[Expand]
Inherited Methods
From class java.lang.Object

Constants

public static final int INSTANCE_LENGTH

Length of an Eddystone UID instance, in bytes.

Constant Value: 6 (0x00000006)

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 (0x00000010)

public static final int NAMESPACE_LENGTH

Length of an Eddystone UID namespace, in bytes.

Constant Value: 10 (0x0000000a)

Public Constructors

public EddystoneUid (String hexId)

Creates an ID.

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

public EddystoneUid (String hexNamespace, String hexInstance)

Creates an ID.

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

Public Methods

public boolean equals (Object o)

Parameters
o Object
Returns
boolean

public static EddystoneUid from (Message message)

Converts a Message of type MESSAGE_TYPE_EDDYSTONE_UID to an EddystoneUid.

Parameters
message Message
Returns
EddystoneUid

public String getHex ()

Returns
String The 16-byte ID, as a hex string.

public String getInstance ()

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

public String getNamespace ()

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

public int hashCode ()

Returns
int

public String toString ()

Returns
String