private final byte[] mBytes;
/**
-
Returns the advertising flags indicating the discoverable mode and capability of the device.
-
Returns -1 if the flag field is not set.
*/
public int getAdvertiseFlags() {
return mAdvertiseFlags;
}
/**
-
Returns a list of service UUIDs within the advertisement that are used to identify the
-
bluetooth GATT services.
*/
public List getServiceUuids() {
return mServiceUuids;
}
/**
-
Returns a sparse array of manufacturer identifier and its corresponding manufacturer specific
-
data.
*/
public SparseArray<byte[]> getManufacturerSpecificData() {
return mManufacturerSpecificData;
}
/**
-
Returns the manufacturer specific data associated with the manufacturer id. Returns
-
{@code null} if the {@code manufacturerId} is not found.
*/
@Nullable
public byte[] getManufacturerSpecificData(int manufacturerId) {
return mManufacturerSpecificData.get(manufacturerId);
}
/**
- Returns a map of service UUID and its corresponding service data.
*/
public Map<ParcelUuid, byte[]> getServiceData() {
return mServiceData;
}
/**
-
Returns the service data byte array associated with the {@code serviceUuid}. Returns
-
{@code null} if the {@code serviceDataUuid} is not found.
*/
@Nullable
public byte[] getServiceData(ParcelUuid serviceDataUuid) {
if (serviceDataUuid == null) {
return null;
}
return mServiceData.get(serviceDataUuid);
}
/**
-
Returns the transmission power level of the packet in dBm. Returns {@link 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
*/
public int getTxPowerLevel() {
return mTxPowerLevel;
}
/**
- Returns the local name of the BLE device. The is a UTF-8 encoded string.
*/
@Nullable
public String getDeviceName() {
return