public class BeaconAdvertisement
extends java.lang.Object
| Modifier and Type | Field and Description |
|---|---|
static java.lang.String |
BEACON_TYPE_EID |
static java.lang.String |
BEACON_TYPE_IBEACON |
static java.lang.String |
BEACON_TYPE_UID |
static java.lang.String |
BEACON_TYPE_UNSPECIFIED |
int |
dbm1
A dB at 1m as reported by the beacon device (if reported).
|
long |
detected
A millisecond timestamp based on System.currentTimeMillis().
|
java.lang.String |
device
The Beacon mac address as reported by the operation system.
|
static android.os.ParcelUuid |
EDDYSTONE_UUID
A Bluetooth standard UUID representing a TI Firmware upgrade service
|
java.lang.String |
extra
Any associated telemetry or out-of-band data send in other packets.
|
java.lang.String |
identifier
A String which represents a normalized protocol specific representation of beacon identity.
|
static int |
PROTOCOL_EDDYSTONE_EID |
static int |
PROTOCOL_EDDYSTONE_UID |
static int |
PROTOCOL_EDDYSTONE_URL |
static int |
PROTOCOL_GENERIC |
static int |
PROTOCOL_IBEACON |
static int |
PROTOCOL_KONTAKT |
static int |
PROTOCOL_SECURECAST |
static int |
PROTOCOL_SWIRL |
static int |
PROTOCOL_UNKNOWN |
int |
rssi
An RSSI value as reported by the operating system.
|
static android.os.ParcelUuid |
SECURECAST_UUID
A Bluetooth standard UUID representing the SecureCast Service.
|
| Modifier and Type | Method and Description |
|---|---|
boolean |
equals(java.lang.Object o) |
static BeaconAdvertisement |
fromBytes(byte[] scanRecord,
int rssi,
long timestamp,
java.lang.String device)
Construct a BeaconAdvertisement from an array of bytes.
|
static BeaconAdvertisement |
fromScanRecord(android.bluetooth.le.ScanRecord scanRecord,
int rssi,
long timestamp,
java.lang.String device)
Constructs a BeaconAdvertisement from a scanRecord
|
int |
getDbm1() |
static java.lang.String |
getGoogleBeaconId(java.lang.String identifier)
Returns the google proximity beacon API compatible formatted identifier
|
static java.lang.String |
getGoogleBeaconType(java.lang.String identifier)
Returns the google proximity beacon API compatible formatted type identifier
|
java.lang.String |
getNamespaceString()
Returns the namespace string for eddystone-uid protocols
|
int |
getProtocol()
Returns the identifier for the protocol
|
static int |
getProtocol(java.lang.String identifier)
Returns the identifier for the protocol given an identifier
|
java.lang.String |
getProtocolString()
Returns the protocol of the advertisement
|
static java.lang.String |
getProtocolString(int id)
Returns the protocol description given the id
|
int |
hashCode() |
boolean |
isConnectable()
Returns the connectability state of the device
NOTE: unfortunately due to a current android limitation, always returns *true*
|
static java.lang.String[] |
parseIdentifier(java.lang.String identifier)
Returns a parsed urn identifier
|
java.lang.String |
toString() |
java.lang.String |
uniquePrefix() |
static java.lang.String |
uniquePrefix(java.lang.String identifier) |
public static final int PROTOCOL_UNKNOWN
public static final int PROTOCOL_IBEACON
public static final int PROTOCOL_EDDYSTONE_URL
public static final int PROTOCOL_EDDYSTONE_UID
public static final int PROTOCOL_EDDYSTONE_EID
public static final int PROTOCOL_SECURECAST
public static final int PROTOCOL_SWIRL
public static final int PROTOCOL_KONTAKT
public static final int PROTOCOL_GENERIC
public static final android.os.ParcelUuid SECURECAST_UUID
public static final android.os.ParcelUuid EDDYSTONE_UUID
public java.lang.String identifier
public long detected
public int rssi
public int dbm1
public java.lang.String device
public java.lang.String extra
public static final java.lang.String BEACON_TYPE_UID
public static final java.lang.String BEACON_TYPE_EID
public static final java.lang.String BEACON_TYPE_IBEACON
public static final java.lang.String BEACON_TYPE_UNSPECIFIED
public int getDbm1()
public boolean equals(java.lang.Object o)
equals in class java.lang.Objectpublic int hashCode()
hashCode in class java.lang.Objectpublic java.lang.String toString()
toString in class java.lang.Objectpublic static java.lang.String getProtocolString(int id)
public static int getProtocol(java.lang.String identifier)
public static java.lang.String[] parseIdentifier(java.lang.String identifier)
identifier - public java.lang.String getNamespaceString()
public java.lang.String getProtocolString()
public int getProtocol()
public boolean isConnectable()
public java.lang.String uniquePrefix()
public static java.lang.String uniquePrefix(java.lang.String identifier)
public static java.lang.String getGoogleBeaconType(java.lang.String identifier)
identifier - public static java.lang.String getGoogleBeaconId(java.lang.String identifier)
identifier - public static BeaconAdvertisement fromScanRecord(android.bluetooth.le.ScanRecord scanRecord, int rssi, long timestamp, java.lang.String device)
scanRecord - The scanRecordrssi - The RSSI valuetimestamp - The milliseconds since epochdevice - The mac-addressof the broadcasting devicepublic static BeaconAdvertisement fromBytes(byte[] scanRecord, int rssi, long timestamp, java.lang.String device)
scanRecord - The array of bytes containing advertisement data.rssi - The RSSI value.timestamp - The number of milliseconds since epoch start.device - The mac-address of the bluetooth device (if available).