public class DistinctPacketDetector extends Object
This class tracks whether multiple distinct BLE packets have been seen, with the purpose of determining if the Android device supports detecting multiple distinct packets in a single scan. Some older devices are not capable of this (e.g. Nexus 4, Moto G1), so detecting multiple packets requires stopping and restarting scanning on these devices. This allows detecting if that is necessary.
This class is not thread safe.
| Constructor and Description |
|---|
DistinctPacketDetector() |
| Modifier and Type | Method and Description |
|---|---|
void |
clearDetections() |
boolean |
isPacketDistinct(String originMacAddress,
byte[] scanRecord) |
public void clearDetections()
public boolean isPacketDistinct(@NonNull
String originMacAddress,
@NonNull
byte[] scanRecord)