public class Beacon
extends java.lang.Object
限定符和类型 | 字段和说明 |
---|---|
static |
CREATOR |
static int |
PROXIMITY_FAR
>3m far
|
static int |
PROXIMITY_IMMEDIATE
< 0.5m immediate
|
static int |
PROXIMITY_NEAR
0.5~3m near
|
static int |
PROXIMITY_UNKNOWN
No distance Unknown
|
构造器和说明 |
---|
Beacon(java.lang.String proximityUUID,
java.lang.String name,
java.lang.String macAddress,
int major,
int minor,
int measuredPower,
int rssi) |
Beacon(java.lang.String proximityUUID,
java.lang.String name,
java.lang.String macAddress,
int major,
int minor,
int measuredPower,
int rssi,
int power) |
限定符和类型 | 方法和说明 |
---|---|
int |
describeContents() |
boolean |
equals(java.lang.Object o) |
double |
getDistance()
获取beacon的距离
|
java.lang.String |
getMacAddress()
获取beacon的mac地址
|
int |
getMajor()
获取beacon的Major值
|
int |
getMeasuredPower()
获取beacon的measurePower
|
int |
getMinor()
获取beacon的minor值
|
java.lang.String |
getName()
获取beacon名称
|
int |
getPower()
获取beacon的电量(固件版本2.1及以上使用)
|
int |
getProximity()
获取beacon的远近情况
|
java.lang.String |
getProximityUUID()
获取beacon的ProximityUUID
|
int |
getRssi()
获取beacon的RSSI
|
int |
hashCode() |
java.lang.String |
toString() |
void |
writeToParcel(Parcel dest,
int flags) |
public static final int PROXIMITY_IMMEDIATE
public static final int PROXIMITY_NEAR
public static final int PROXIMITY_FAR
public static final int PROXIMITY_UNKNOWN
public static finalCREATOR
public Beacon(java.lang.String proximityUUID, java.lang.String name, java.lang.String macAddress, int major, int minor, int measuredPower, int rssi)
public Beacon(java.lang.String proximityUUID, java.lang.String name, java.lang.String macAddress, int major, int minor, int measuredPower, int rssi, int power)
public int describeContents()
public boolean equals(java.lang.Object o)
equals
在类中 java.lang.Object
public double getDistance()
public java.lang.String getMacAddress()
public int getMajor()
public int getMeasuredPower()
public int getMinor()
public java.lang.String getName()
public int getProximity()
public java.lang.String getProximityUUID()
public int getRssi()
public int getPower()
public int hashCode()
hashCode
在类中 java.lang.Object
public java.lang.String toString()
toString
在类中 java.lang.Object
public void writeToParcel(Parcel dest, int flags)