IBeaconId
Stay organized with collections
Save and categorize content based on your preferences.
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
IBeaconId
( UUID
proximityUuid,
short major, short minor) Creates an iBeacon ID.
Inherited Method Summary
From class java.lang.Object
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.
Constant Value:
20
Public Constructors
public
IBeaconId
( UUID
proximityUuid, short
major, short minor)
Public Methods
public boolean
equals
( Object
o)
public UUID
getProximityUuid
()
Returns the proximity UUID.
Except as otherwise noted, the content of this page is licensed under the Creative Commons Attribution 4.0 License
, and code samples are licensed under the Apache 2.0 License
. For details, see the Google Developers Site Policies
. Java is a registered trademark of Oracle and/or its affiliates.
Last updated 2024-10-31 UTC.
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Missing the information I need","missingTheInformationINeed","thumb-down"],["Too complicated / too many steps","tooComplicatedTooManySteps","thumb-down"],["Out of date","outOfDate","thumb-down"],["Samples / code issue","samplesCodeIssue","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2024-10-31 UTC."],[[["\u003cp\u003e\u003ccode\u003eIBeaconId\u003c/code\u003e represents an iBeacon identifier used for broadcasting by BLE beacons and iOS devices, comprising a proximity UUID, major value, and minor value.\u003c/p\u003e\n"],["\u003cp\u003eIt provides methods to access the proximity UUID, major and minor values, and to convert a \u003ccode\u003eMessage\u003c/code\u003e to an \u003ccode\u003eIBeaconId\u003c/code\u003e.\u003c/p\u003e\n"],["\u003cp\u003eAn \u003ccode\u003eIBeaconId\u003c/code\u003e 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.\u003c/p\u003e\n"],["\u003cp\u003eYou can create an \u003ccode\u003eIBeaconId\u003c/code\u003e using the constructor by providing the proximity UUID, major value, and minor value.\u003c/p\u003e\n"],["\u003cp\u003e\u003ccode\u003eIBeaconId\u003c/code\u003e offers methods for comparison (\u003ccode\u003eequals\u003c/code\u003e), hashing (\u003ccode\u003ehashCode\u003c/code\u003e), and string representation (\u003ccode\u003etoString\u003c/code\u003e).\u003c/p\u003e\n"]]],[],null,["# IBeaconId\n\npublic class **IBeaconId** extends [Object](//developer.android.com/reference/java/lang/Object.html) \nAn iBeacon ID, which can be broadcast by BLE beacons and iOS devices. \n\n### Constant Summary\n\n|-----|--------------------------------------------------------------------------------------|------------------------------------|\n| int | [LENGTH](/android/reference/com/google/android/gms/nearby/messages/IBeaconId#LENGTH) | Length of an iBeacon ID, in bytes. |\n\n### Public Constructor Summary\n\n|---|------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| | [IBeaconId](/android/reference/com/google/android/gms/nearby/messages/IBeaconId#IBeaconId(java.util.UUID,%20short,%20short))([UUID](//developer.android.com/reference/java/util/UUID.html) proximityUuid, short major, short minor) Creates an iBeacon ID. |\n\n### Public Method Summary\n\n|-----------------------------------------------------------------------------------------|---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| boolean | [equals](/android/reference/com/google/android/gms/nearby/messages/IBeaconId#equals(java.lang.Object))([Object](//developer.android.com/reference/java/lang/Object.html) o) |\n| static [IBeaconId](/android/reference/com/google/android/gms/nearby/messages/IBeaconId) | [from](/android/reference/com/google/android/gms/nearby/messages/IBeaconId#from(com.google.android.gms.nearby.messages.Message))([Message](/android/reference/com/google/android/gms/nearby/messages/Message) message) Converts a Message of type [Message.MESSAGE_TYPE_I_BEACON_ID](/android/reference/com/google/android/gms/nearby/messages/Message#MESSAGE_TYPE_I_BEACON_ID) to an IBeaconId. |\n| short | [getMajor](/android/reference/com/google/android/gms/nearby/messages/IBeaconId#getMajor())() Returns the major value. |\n| short | [getMinor](/android/reference/com/google/android/gms/nearby/messages/IBeaconId#getMinor())() Returns the minor value. |\n| [UUID](//developer.android.com/reference/java/util/UUID.html) | [getProximityUuid](/android/reference/com/google/android/gms/nearby/messages/IBeaconId#getProximityUuid())() Returns the proximity UUID. |\n| int | [hashCode](/android/reference/com/google/android/gms/nearby/messages/IBeaconId#hashCode())() |\n| [String](//developer.android.com/reference/java/lang/String.html) | [toString](/android/reference/com/google/android/gms/nearby/messages/IBeaconId#toString())() |\n\n### Inherited Method Summary\n\nFrom class java.lang.Object \n\n|----------------------------------------------------------------------------|--------------------------------------------------------------------------------|\n| [Object](//developer.android.com/reference/java/lang/Object.html) | clone() |\n| boolean | equals([Object](//developer.android.com/reference/java/lang/Object.html) arg0) |\n| void | finalize() |\n| final [Class](//developer.android.com/reference/java/lang/Class.html)\\\u003c?\\\u003e | getClass() |\n| int | hashCode() |\n| final void | notify() |\n| final void | notifyAll() |\n| [String](//developer.android.com/reference/java/lang/String.html) | toString() |\n| final void | wait(long arg0, int arg1) |\n| final void | wait(long arg0) |\n| final void | wait() |\n\nConstants\n---------\n\n#### public static final int\n**LENGTH**\n\nLength of an iBeacon ID, in bytes. An iBeacon ID consists of a 16-byte proximity\nUUID, followed by a 2-byte major value and a 2-byte minor value. \nConstant Value: 20\n\nPublic Constructors\n-------------------\n\n#### public **IBeaconId** ([UUID](//developer.android.com/reference/java/util/UUID.html) proximityUuid, short major, short minor)\n\nCreates an iBeacon ID.\n\nPublic Methods\n--------------\n\n#### public boolean **equals** ([Object](//developer.android.com/reference/java/lang/Object.html) o)\n\n#### public static [IBeaconId](/android/reference/com/google/android/gms/nearby/messages/IBeaconId)\n**from** ([Message](/android/reference/com/google/android/gms/nearby/messages/Message) message)\n\nConverts a Message of type [Message.MESSAGE_TYPE_I_BEACON_ID](/android/reference/com/google/android/gms/nearby/messages/Message#MESSAGE_TYPE_I_BEACON_ID) to an IBeaconId. \n\n##### See Also\n\n- [MessageFilter.Builder.includeIBeaconIds(UUID, Short, Short)](/android/reference/com/google/android/gms/nearby/messages/MessageFilter.Builder#includeIBeaconIds(java.util.UUID,%20java.lang.Short,%20java.lang.Short)) \n\n#### public short **getMajor** ()\n\nReturns the major value. \n\n#### public short **getMinor** ()\n\nReturns the minor value. \n\n#### public [UUID](//developer.android.com/reference/java/util/UUID.html) **getProximityUuid** ()\n\nReturns the proximity UUID. \n\n#### public int **hashCode** ()\n\n#### public [String](//developer.android.com/reference/java/lang/String.html) **toString** ()"]]