Package 

Class CompatScanRecord


  • 
    public final class CompatScanRecord
    
                        

    Represents a scan record from Bluetooth LE scan. Copied from the 5.0 sdk for use with 4.4.

    • Method Detail

      • parseFromBytes

         static CompatScanRecord parseFromBytes(Array<byte> scanRecord)

        Parse scan record bytes to CompatScanRecord.

        The format is defined in Bluetooth 4.1 specification, Volume 3, Part C, Section 11 and 18.

        All numerical multi-byte entities and values shall use little-endian byte order.

        Parameters:
        scanRecord - The scan record of Bluetooth LE advertisement and/or scan response.
      • getAdvertiseFlags

         int getAdvertiseFlags()

        Returns the advertising flags indicating the discoverable mode and capability of the device. Returns -1 if the flag field is not set.

      • getServiceUuids

         List<ParcelUuid> getServiceUuids()

        Returns a list of service UUIDs within the advertisement that are used to identify the bluetooth GATT services.

      • getManufacturerSpecificData

        @Nullable() Array<byte> getManufacturerSpecificData(int manufacturerId)

        Returns the manufacturer specific data associated with the manufacturer id. Returns {@code null} if the {@code manufacturerId} is not found.

      • getServiceData

        @Nullable() Array<byte> getServiceData(ParcelUuid serviceDataUuid)

        Returns the service data byte array associated with the {@code serviceUuid}. Returns {@code null} if the {@code serviceDataUuid} is not found.

      • getTxPowerLevel

         int getTxPowerLevel()

        Returns the transmission power level of the packet in dBm. Returns 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

      • getBytes

         Array<byte> getBytes()

        Returns raw bytes of scan record.