AI-generated Key Takeaways
-
IBeaconId
represents an iBeacon identifier used for broadcasting by BLE beacons and iOS devices, comprising a proximity UUID, major value, and minor value. -
It provides methods to access the proximity UUID, major and minor values, and to convert a
Message
to anIBeaconId
. -
An
IBeaconId
has a fixed length of 20 bytes, including 16 bytes for the UUID, 2 bytes for the major value, and 2 bytes for the minor value. -
You can create an
IBeaconId
using the constructor by providing the proximity UUID, major value, and minor value. -
IBeaconId
offers methods for comparison (equals
), hashing (hashCode
), and string representation (toString
).
An iBeacon ID, which can be broadcast by BLE beacons and iOS devices.
Constant Summary
int | LENGTH | Length of an iBeacon ID, in bytes. |
Public Constructor Summary
Public Method Summary
boolean | |
static IBeaconId | |
short |
getMajor()
Returns the major value.
|
short |
getMinor()
Returns the minor value.
|
UUID |
getProximityUuid()
Returns the proximity UUID.
|
int |
hashCode()
|
String |
toString()
|
Inherited Method Summary
Constants
public static final int LENGTH
Length of an iBeacon ID, in bytes. An iBeacon ID consists of a 16-byte proximity UUID, followed by a 2-byte major value and a 2-byte minor value.
Public Constructors
public IBeaconId (UUID proximityUuid, short major, short minor)
Creates an iBeacon ID.
Public Methods
public boolean equals (Object o)
public static IBeaconId from (Message message)
Converts a Message of type
Message.MESSAGE_TYPE_I_BEACON_ID
to an IBeaconId.
public short getMajor ()
Returns the major value.
public short getMinor ()
Returns the minor value.
public UUID getProximityUuid ()
Returns the proximity UUID.