public class BeaconDevice extends java.lang.Object implements IBeaconDevice
Beacon) which represents a JSON model
for a Beacon and is accessible while interacting with the REST Client.RemoteBluetoothDevice.Characteristics| Modifier and Type | Field and Description |
|---|---|
static <any> |
CREATOR
The Parcelable CREATOR constant.
|
| Constructor and Description |
|---|
BeaconDevice(IBeaconAdvertisingPacket advertisingPacket)
Instantiates a new Beacon.
|
| Modifier and Type | Method and Description |
|---|---|
int |
compareTo(IBeaconDevice another) |
int |
describeContents() |
boolean |
equals(java.lang.Object o) |
java.lang.String |
getAddress()
Gets MAC address of beacon.
|
int |
getBatteryPower()
Returns percentage battery power.
|
double |
getDistance()
Gets accuracy.
|
java.lang.String |
getFirmwareVersion()
Gets firmware version.
|
int |
getMajor()
Gets major value.
|
int |
getMinor()
Gets minor value.
|
java.lang.String |
getName()
Gets beacon name.
|
byte[] |
getPassword()
Gets password.
|
DeviceProfile |
getProfile() |
Proximity |
getProximity()
Gets one of three values: IMMEDIATE, NEAR, FAR.
|
java.util.UUID |
getProximityUUID()
Gets Proximity UUID.
|
double |
getRssi()
Gets rssi.
|
long |
getTimestamp()
Gets timestamp - time when beacon device was discovered
|
int |
getTxPower()
Gets measured power.
|
java.lang.String |
getUniqueId()
Gets beacon unique id.
|
int |
hashCode() |
boolean |
isShuffled()
Checks is device shuffled
|
static BeaconDevice |
of(IBeaconDevice beaconDevice,
ResolvedId resolvedId)
Creates BeaconDevice from
BeaconDevice and ResolvedId |
void |
setPassword(byte[] password)
Sets authorization password.
|
void |
writeToParcel(Parcel output,
int flags) |
public BeaconDevice(IBeaconAdvertisingPacket advertisingPacket)
advertisingPacket - the advertising packagepublic static BeaconDevice of(IBeaconDevice beaconDevice, ResolvedId resolvedId)
BeaconDevice and ResolvedId
Should be used when resolving shuffled beacons manually
beaconDevice - source beacon deviceresolvedId - target resolved valuespublic int describeContents()
public void writeToParcel(Parcel output,
int flags)
public int compareTo(IBeaconDevice another)
compareTo in interface java.lang.Comparable<IBeaconDevice>public boolean equals(java.lang.Object o)
equals in class java.lang.Objectpublic int hashCode()
hashCode in class java.lang.Objectpublic long getTimestamp()
getTimestamp in interface RemoteBluetoothDevicepublic java.util.UUID getProximityUUID()
getProximityUUID in interface IBeaconDevicepublic Proximity getProximity()
getProximity in interface RemoteBluetoothDevicepublic int getBatteryPower()
getBatteryPower in interface RemoteBluetoothDevicepublic int getMajor()
getMajor in interface IBeaconDevicepublic java.lang.String getUniqueId()
getUniqueId in interface RemoteBluetoothDevicepublic int getMinor()
getMinor in interface IBeaconDevicepublic int getTxPower()
getTxPower in interface RemoteBluetoothDevicepublic DeviceProfile getProfile()
getProfile in interface RemoteBluetoothDevicepublic double getDistance()
getDistance in interface RemoteBluetoothDevicepublic java.lang.String getAddress()
getAddress in interface RemoteBluetoothDevicepublic void setPassword(byte[] password)
setPassword in interface RemoteBluetoothDevicepassword - the passwordpublic byte[] getPassword()
getPassword in interface RemoteBluetoothDevicepublic double getRssi()
getRssi in interface RemoteBluetoothDevicepublic java.lang.String getName()
getName in interface RemoteBluetoothDevicepublic java.lang.String getFirmwareVersion()
getFirmwareVersion in interface RemoteBluetoothDevicepublic boolean isShuffled()
isShuffled in interface RemoteBluetoothDevice