Package org.altbeacon.beacon
Class AltBeaconParser
- java.lang.Object
-
- org.altbeacon.beacon.BeaconParser
-
- org.altbeacon.beacon.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 onlyBeaconParserthat is used by the library. AdditionalBeaconParserinstances can get created and registered with the library.See BeaconParser for more information.- See Also:
- Serialized Form
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class org.altbeacon.beacon.BeaconParser
BeaconParser.BeaconLayoutException
-
-
Field Summary
Fields Modifier and Type Field Description static StringTAG-
Fields inherited from class org.altbeacon.beacon.BeaconParser
ALTBEACON_LAYOUT, EDDYSTONE_TLM_LAYOUT, EDDYSTONE_UID_LAYOUT, EDDYSTONE_URL_LAYOUT, extraParsers, mAllowPduOverflow, mBeaconLayout, mDataEndOffsets, mDataLittleEndianFlags, mDataStartOffsets, mDBmCorrection, mExtraFrame, mHardwareAssistManufacturers, mIdentifier, mIdentifierEndOffsets, mIdentifierLittleEndianFlags, mIdentifierStartOffsets, mIdentifierVariableLengthFlags, mLayoutSize, mMatchingBeaconTypeCodeEndOffset, mMatchingBeaconTypeCodeStartOffset, mPowerEndOffset, mPowerStartOffset, mServiceUuid, mServiceUuidEndOffset, mServiceUuidStartOffset, URI_BEACON_LAYOUT
-
-
Constructor Summary
Constructors Constructor Description AltBeaconParser()Constructs an AltBeacon Parser and sets its layout
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description BeaconfromScanData(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-
Methods inherited from class org.altbeacon.beacon.BeaconParser
addExtraDataParser, bytesToHex, equals, fromScanData, getBeaconAdvertisementData, getDataFieldCount, getExtraDataParsers, getHardwareAssistManufacturers, getIdentifier, getIdentifierByteCount, getIdentifierCount, getLayout, getMatchingBeaconTypeCode, getMatchingBeaconTypeCodeEndOffset, getMatchingBeaconTypeCodeStartOffset, getMServiceUuidStartOffset, getPowerCorrection, getServiceUuid, getServiceUuidEndOffset, hashCode, longToByteArray, longToByteArray, setAllowPduOverflow, setBeaconLayout, setHardwareAssistManufacturerCodes, setMatchingBeaconTypeCode
-
-
-
-
Field Detail
-
TAG
public static final String TAG
- See Also:
- Constant Field Values
-
-
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:
fromScanDatain classBeaconParser- Parameters:
scanData- The actual packet bytesrssi- The measured signal strength of the packetdevice- The Bluetooth device that was detectedtimestampMs- The timestamp in milliseconds of the scan execution- Returns:
- An instance of an
Beacon
-
-