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.Object
public int hashCode()
hashCode
in class java.lang.Object
public long getTimestamp()
getTimestamp
in interface RemoteBluetoothDevice
public java.util.UUID getProximityUUID()
getProximityUUID
in interface IBeaconDevice
public Proximity getProximity()
getProximity
in interface RemoteBluetoothDevice
public int getBatteryPower()
getBatteryPower
in interface RemoteBluetoothDevice
public int getMajor()
getMajor
in interface IBeaconDevice
public java.lang.String getUniqueId()
getUniqueId
in interface RemoteBluetoothDevice
public int getMinor()
getMinor
in interface IBeaconDevice
public int getTxPower()
getTxPower
in interface RemoteBluetoothDevice
public DeviceProfile getProfile()
getProfile
in interface RemoteBluetoothDevice
public double getDistance()
getDistance
in interface RemoteBluetoothDevice
public java.lang.String getAddress()
getAddress
in interface RemoteBluetoothDevice
public void setPassword(byte[] password)
setPassword
in interface RemoteBluetoothDevice
password
- the passwordpublic byte[] getPassword()
getPassword
in interface RemoteBluetoothDevice
public double getRssi()
getRssi
in interface RemoteBluetoothDevice
public java.lang.String getName()
getName
in interface RemoteBluetoothDevice
public java.lang.String getFirmwareVersion()
getFirmwareVersion
in interface RemoteBluetoothDevice
public boolean isShuffled()
isShuffled
in interface RemoteBluetoothDevice