public class BeaconDevice extends java.lang.Object implements IBeaconDevice
Device
) which represents a JSON model
for a device and is accessible while interacting with the REST Client.Modifier and Type | Class and Description |
---|---|
static class |
BeaconDevice.Builder |
RemoteBluetoothDevice.Characteristics
Modifier and Type | Field and Description |
---|---|
static android.os.Parcelable.Creator<BeaconDevice> |
CREATOR
The Parcelable CREATOR constant.
|
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 distance.
|
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.
|
int |
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 |
setDistance(double distance) |
void |
setPassword(byte[] password)
Sets authorization password.
|
void |
setProximity(Proximity proximity) |
void |
setRssi(int rssi) |
void |
setTimestamp(long timestamp) |
java.lang.String |
toString() |
void |
writeToParcel(android.os.Parcel output,
int flags) |
public static final android.os.Parcelable.Creator<BeaconDevice> CREATOR
public 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()
describeContents
in interface android.os.Parcelable
public void writeToParcel(android.os.Parcel output, int flags)
writeToParcel
in interface android.os.Parcelable
public int compareTo(IBeaconDevice another)
compareTo
in interface java.lang.Comparable<IBeaconDevice>
public int hashCode()
hashCode
in class java.lang.Object
public boolean equals(java.lang.Object o)
equals
in class java.lang.Object
public java.lang.String toString()
toString
in class java.lang.Object
public long getTimestamp()
getTimestamp
in interface RemoteBluetoothDevice
public void setTimestamp(long timestamp)
public java.util.UUID getProximityUUID()
getProximityUUID
in interface IBeaconDevice
public Proximity getProximity()
getProximity
in interface RemoteBluetoothDevice
public void setProximity(Proximity proximity)
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 void setDistance(double distance)
public java.lang.String getAddress()
getAddress
in interface RemoteBluetoothDevice
public byte[] getPassword()
getPassword
in interface RemoteBluetoothDevice
public void setPassword(byte[] password)
setPassword
in interface RemoteBluetoothDevice
password
- the passwordpublic int getRssi()
getRssi
in interface RemoteBluetoothDevice
public void setRssi(int rssi)
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