public class ScanRecordImplCompat extends java.lang.Object implements ScanRecord
ScanRecord without parsing code| Constructor and Description |
|---|
ScanRecordImplCompat(java.util.List<android.os.ParcelUuid> serviceUuids,
android.util.SparseArray<byte[]> manufacturerData,
java.util.Map<android.os.ParcelUuid,byte[]> serviceData,
int advertiseFlags,
int txPowerLevel,
java.lang.String localName,
byte[] bytes) |
| Modifier and Type | Method and Description |
|---|---|
int |
getAdvertiseFlags()
Returns the advertising flags indicating the discoverable mode and capability of the device.
|
byte[] |
getBytes()
Returns raw bytes of scan record.
|
java.lang.String |
getDeviceName()
Returns the local name of the BLE device.
|
android.util.SparseArray<byte[]> |
getManufacturerSpecificData()
Returns a sparse array of manufacturer identifier and its corresponding manufacturer specific
data.
|
byte[] |
getManufacturerSpecificData(int manufacturerId)
Returns the manufacturer specific data associated with the manufacturer id.
|
java.util.Map<android.os.ParcelUuid,byte[]> |
getServiceData()
Returns a map of service UUID and its corresponding service data.
|
byte[] |
getServiceData(android.os.ParcelUuid serviceDataUuid)
Returns the service data byte array associated with the
serviceUuid. |
java.util.List<android.os.ParcelUuid> |
getServiceUuids()
Returns a list of service UUIDs within the advertisement that are used to identify the
bluetooth GATT services.
|
int |
getTxPowerLevel()
Returns the transmission power level of the packet in dBm.
|
public ScanRecordImplCompat(java.util.List<android.os.ParcelUuid> serviceUuids,
android.util.SparseArray<byte[]> manufacturerData,
java.util.Map<android.os.ParcelUuid,byte[]> serviceData,
int advertiseFlags,
int txPowerLevel,
java.lang.String localName,
byte[] bytes)
public int getAdvertiseFlags()
getAdvertiseFlags in interface ScanRecordpublic java.util.List<android.os.ParcelUuid> getServiceUuids()
getServiceUuids in interface ScanRecordpublic android.util.SparseArray<byte[]> getManufacturerSpecificData()
getManufacturerSpecificData in interface ScanRecordpublic byte[] getManufacturerSpecificData(int manufacturerId)
null if the manufacturerId is not found.getManufacturerSpecificData in interface ScanRecordpublic java.util.Map<android.os.ParcelUuid,byte[]> getServiceData()
getServiceData in interface ScanRecordpublic byte[] getServiceData(android.os.ParcelUuid serviceDataUuid)
serviceUuid. Returns
null if the serviceDataUuid is not found.getServiceData in interface ScanRecordpublic int getTxPowerLevel()
Integer.MIN_VALUE
if the field is not set. This value can be used to calculate the path loss of a received
packet using the following equation:
pathloss = txPowerLevel - rssi
getTxPowerLevel in interface ScanRecordpublic java.lang.String getDeviceName()
getDeviceName in interface ScanRecordpublic byte[] getBytes()
getBytes in interface ScanRecord