Summary: Constants | Ctors | Methods | Inherited Methods | [Expand All]
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

- Eddystone UID specification

## 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
Object | clone()
boolean | equals(Object arg0)
void | finalize()
final Class<?> | getClass()
int | hashCode()
final void | notify()
final void | notifyAll()
String | toString()
final void | wait(long arg0, int arg1)
final void | wait(long arg0)
final void | wait()

## 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 | 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.

##### See Also

- `includeEddystoneUids(String, String)`

#### 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 ()