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.Parcelablepublic void writeToParcel(android.os.Parcel output,
int flags)
writeToParcel in interface android.os.Parcelablepublic int compareTo(IBeaconDevice another)
compareTo in interface java.lang.Comparable<IBeaconDevice>public int hashCode()
hashCode in class java.lang.Objectpublic boolean equals(java.lang.Object o)
equals in class java.lang.Objectpublic java.lang.String toString()
toString in class java.lang.Objectpublic long getTimestamp()
getTimestamp in interface RemoteBluetoothDevicepublic void setTimestamp(long timestamp)
public java.util.UUID getProximityUUID()
getProximityUUID in interface IBeaconDevicepublic Proximity getProximity()
getProximity in interface RemoteBluetoothDevicepublic void setProximity(Proximity proximity)
public 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 void setDistance(double distance)
public java.lang.String getAddress()
getAddress in interface RemoteBluetoothDevicepublic byte[] getPassword()
getPassword in interface RemoteBluetoothDevicepublic void setPassword(byte[] password)
setPassword in interface RemoteBluetoothDevicepassword - the passwordpublic int getRssi()
getRssi in interface RemoteBluetoothDevicepublic void setRssi(int rssi)
public java.lang.String getName()
getName in interface RemoteBluetoothDevicepublic java.lang.String getFirmwareVersion()
getFirmwareVersion in interface RemoteBluetoothDevicepublic boolean isShuffled()
isShuffled in interface RemoteBluetoothDevice