public class BeaconDevice
extends java.lang.Object
implements android.os.Parcelable
| 限定符和类型 | 字段和说明 |
|---|---|
static android.os.Parcelable.Creator<BeaconDevice> |
CREATOR |
| 构造器和说明 |
|---|
BeaconDevice(android.bluetooth.BluetoothDevice bluetoothDevice,
int rssi,
byte[] scanRecord,
long lastUpdatedTimeMillis) |
BeaconDevice(android.bluetooth.BluetoothDevice bluetoothDevice,
int rssi,
byte[] scanRecord,
long lastUpdatedTimeMillis,
boolean createIBeacon) |
| 限定符和类型 | 方法和说明 |
|---|---|
static java.lang.String |
asHex(byte[] bytes)
将字节数组转换为十六进制字符串
|
int |
describeContents() |
android.bluetooth.BluetoothDevice |
getBluetoothDevice() |
java.lang.String |
getDeviceName() |
IBeacon |
getiBeacon() |
long |
getLastUpdatedTimeMillis() |
int |
getRssi() |
byte[] |
getScanRecord() |
java.lang.String |
getScanRecordHexString() |
void |
setBluetoothDevice(android.bluetooth.BluetoothDevice bluetoothDevice) |
void |
setDeviceName(java.lang.String deviceName) |
void |
setLastUpdatedTimeMillis(long lastUpdatedTimeMillis) |
void |
setRssi(int rssi) |
void |
setScanRecord(byte[] scanRecord) |
java.lang.String |
toString() |
void |
updateDevice(android.bluetooth.BluetoothDevice bluetoothDevice,
int rssi,
byte[] scanRecord,
long lastUpdatedTimeMillis)
更新当前设备的信息
|
void |
writeToParcel(android.os.Parcel dest,
int flags) |
public static final android.os.Parcelable.Creator<BeaconDevice> CREATOR
public BeaconDevice(@NonNull
android.bluetooth.BluetoothDevice bluetoothDevice,
int rssi,
@NonNull
byte[] scanRecord,
long lastUpdatedTimeMillis)
public BeaconDevice(@NonNull
android.bluetooth.BluetoothDevice bluetoothDevice,
int rssi,
@NonNull
byte[] scanRecord,
long lastUpdatedTimeMillis,
boolean createIBeacon)
public android.bluetooth.BluetoothDevice getBluetoothDevice()
public void setBluetoothDevice(android.bluetooth.BluetoothDevice bluetoothDevice)
public int getRssi()
public void setRssi(int rssi)
public byte[] getScanRecord()
public void setScanRecord(byte[] scanRecord)
public java.lang.String getDeviceName()
public void setDeviceName(java.lang.String deviceName)
public IBeacon getiBeacon()
public long getLastUpdatedTimeMillis()
public void setLastUpdatedTimeMillis(long lastUpdatedTimeMillis)
public void updateDevice(@NonNull
android.bluetooth.BluetoothDevice bluetoothDevice,
int rssi,
@NonNull
byte[] scanRecord,
long lastUpdatedTimeMillis)
bluetoothDevice - rssi - scanRecord - lastUpdatedTimeMillis - public java.lang.String getScanRecordHexString()
@NonNull
public static java.lang.String asHex(@NonNull
byte[] bytes)
bytes - 字节数组public java.lang.String toString()
toString 在类中 java.lang.Objectpublic void writeToParcel(android.os.Parcel dest,
int flags)
writeToParcel 在接口中 android.os.Parcelablepublic int describeContents()
describeContents 在接口中 android.os.Parcelable