public static class ScanFilter.ScanEvent extends Event
ScanFilter.onEvent(ScanEvent)
to aid in making a decision.Modifier and Type | Method and Description |
---|---|
java.util.List<java.util.UUID> |
advertisedServices()
A list of
UUID s parsed from scanRecord() as a convenience. |
int |
advertisingFlags()
Returns the advertising flags, if any, parsed from
scanRecord() . |
State.ChangeIntent |
lastDisconnectIntent()
See explanation at
BleDevice.getLastDisconnectIntent() . |
java.lang.String |
macAddress()
Returns the mac address of the discovered device.
|
byte[] |
manufacturerData() |
java.util.List<ManufacturerData> |
manufacturerDataList()
Returns the manufacturer-specific data, if any, parsed from
scanRecord() . |
int |
manufacturerId() |
java.lang.String |
name_native()
The unaltered device name retrieved from the native bluetooth stack.
|
java.lang.String |
name_normalized()
See
BleDevice.getName_normalized() for an explanation. |
android.bluetooth.BluetoothDevice |
nativeInstance()
Other parameters are probably enough to make a decision but this native instance is provided just in case.
|
int |
rssi()
The RSSI received when the device was discovered.
|
byte[] |
scanRecord()
The raw scan record received when the device was discovered.
|
java.util.Map<java.util.UUID,byte[]> |
serviceData()
Returns the service data, if any, parsed from
scanRecord() . |
java.lang.String |
toString() |
int |
txPower()
Returns the transmission power of the device in decibels, or
BleNodeConfig.INVALID_TX_POWER if device is not advertising its transmission power. |
public android.bluetooth.BluetoothDevice nativeInstance()
public java.util.List<java.util.UUID> advertisedServices()
UUID
s parsed from scanRecord()
as a convenience. May be empty, notably
if BleManagerConfig.revertToClassicDiscoveryIfNeeded
is invoked.public java.lang.String name_native()
public java.lang.String name_normalized()
BleDevice.getName_normalized()
for an explanation.public byte[] scanRecord()
BleManagerConfig.revertToClassicDiscoveryIfNeeded
is invoked.public int rssi()
public int txPower()
BleNodeConfig.INVALID_TX_POWER
if device is not advertising its transmission power.public java.lang.String macAddress()
public State.ChangeIntent lastDisconnectIntent()
BleDevice.getLastDisconnectIntent()
.
lastDisconnectIntent()
isn't State.ChangeIntent.NULL
then most likely you can early-out
and return true
from ScanFilter.onEvent(ScanEvent)
without having to check
uuids or names matching, because obviously you've seen and connected to this device before.public int advertisingFlags()
scanRecord()
.public java.util.List<ManufacturerData> manufacturerDataList()
scanRecord()
.public byte[] manufacturerData()
public int manufacturerId()
public java.util.Map<java.util.UUID,byte[]> serviceData()
scanRecord()
.public java.lang.String toString()
toString
in class java.lang.Object