public class Beacon
extends java.lang.Object
implements android.os.Parcelable
SBeacon
, EddystoneUIDBeacon
, EddystoneURLBeacon
,
EddystoneTLMBeacon
, IBeacon
are used to proviside in-depth information about their
represented beacon types.Modifier and Type | Field and Description |
---|---|
static android.os.Parcelable.Creator<Beacon> |
CREATOR |
Constructor and Description |
---|
Beacon() |
Beacon(android.bluetooth.BluetoothDevice bluetoothDevice) |
Modifier and Type | Method and Description |
---|---|
int |
describeContents() |
boolean |
equals(java.lang.Object o) |
android.bluetooth.BluetoothDevice |
getBluetoothDevice() |
Distance |
getDistance()
Gets the distance estimate of a beacon
|
long |
getLastSeen()
Gets the last seen date for this beacon
|
java.lang.String |
getName() |
int |
getRSSI()
Gets the RSSI for this beacon
|
int |
getTransmissionPower() |
java.lang.String |
getTypeString()
Gets the type of this beacon as a string
|
int |
getVisibilityTimeoutInterval()
Gets the visibilityTimeoutInterval
|
int |
hashCode() |
boolean |
isVisible()
Checks if the beacon is currently visible WRT the visibilityTimeoutInterval
|
void |
setLastSeen(long lastSeen) |
void |
setRSSI(int RSSI) |
void |
setVisibilityTimeoutInterval(int visibilityTimeoutInterval)
Sets the visibilityTimeoutInterval
|
void |
updateProperties(byte[] data) |
void |
writeToParcel(android.os.Parcel dest,
int flags) |
public static final android.os.Parcelable.Creator<Beacon> CREATOR
public Beacon(android.bluetooth.BluetoothDevice bluetoothDevice)
public Beacon()
public int getRSSI()
public void setRSSI(int RSSI)
public long getLastSeen()
public void setLastSeen(long lastSeen)
public java.lang.String getTypeString()
public int getTransmissionPower()
@Nullable public java.lang.String getName()
public android.bluetooth.BluetoothDevice getBluetoothDevice()
public boolean isVisible()
public int getVisibilityTimeoutInterval()
public void setVisibilityTimeoutInterval(int visibilityTimeoutInterval)
visibilityTimeoutInterval
- an int in secondspublic void updateProperties(byte[] data)
public Distance getDistance()
public boolean equals(java.lang.Object o)
equals
in class java.lang.Object
public int hashCode()
hashCode
in class java.lang.Object
public int describeContents()
describeContents
in interface android.os.Parcelable
public void writeToParcel(android.os.Parcel dest, int flags)
writeToParcel
in interface android.os.Parcelable