Class AltBeaconParser

  • All Implemented Interfaces:
    Serializable

    public class AltBeaconParser
    extends BeaconParser
    A specific beacon parser designed to parse only AltBeacons from raw BLE packets detected by Android. By default, this is the only BeaconParser that is used by the library. Additional BeaconParser instances can get created and registered with the library. See BeaconParser for more information.
    See Also:
    Serialized Form
    • Constructor Detail

      • AltBeaconParser

        public AltBeaconParser()
        Constructs an AltBeacon Parser and sets its layout
    • Method Detail

      • fromScanData

        public Beacon fromScanData​(byte[] scanData,
                                   int rssi,
                                   BluetoothDevice device,
                                   long timestampMs)
        Construct an AltBeacon from a Bluetooth LE packet collected by Android's Bluetooth APIs, including the raw Bluetooth device info
        Overrides:
        fromScanData in class BeaconParser
        Parameters:
        scanData - The actual packet bytes
        rssi - The measured signal strength of the packet
        device - The Bluetooth device that was detected
        timestampMs - The timestamp in milliseconds of the scan execution
        Returns:
        An instance of an Beacon