Klasse DiscoveryData

java.lang.Object
com.blukii.sdk.discovery.DiscoveryData
Alle implementierten Schnittstellen:
android.os.Parcelable

public final class DiscoveryData extends Object implements android.os.Parcelable
Read only data object for emitted data of one Bluetooth LE (BLE) module.

DiscoveryData is a collection of BLE data that is scanned during one scan duration for one BLE module.

It contains the following values if it is provided by the module's hardware and firmware

  • Device found date
  • RSSI value
  • blukii Hardware specific advertising data like firmware, blukii type, advertising interval, battery and txPower
  • Sensor data results of blukii sensor beacons. See BeaconSensorData
  • Eddystone protocol data values. See EddystoneData
  • iBeacon protocol data values. See IBeaconData

Note: if the scan duration (see DiscoverySettings.setScanDuration(int)) is longer than the advertising interval of the module then each value is read only once. The following data frames of the same type are ignored if the corresponding fields are already set in the DiscoveryData object.
The discovery date (getDeviceFoundDate() is the timestamp of the last BLE frame that is scanned by the mobile device.

DiscoveryData is returned by the callback function BlukiiClient.OnDiscoveryListener.onDiscoveryResult(List) after calling BlukiiClient.initDiscovery(BlukiiClient.OnDiscoveryListener).

Siehe auch:
  • Felddetails

    • CREATOR

      public static final android.os.Parcelable.Creator<DiscoveryData> CREATOR
  • Methodendetails

    • getDeviceFoundDate

      public long getDeviceFoundDate()
      Gets the Timestamp of the last scanned BLE frame that is inside the relevant RSSI range (see setting DiscoverySettings.setRssiThreshold(int)).

      This field is set for every scanned BLE module.

      Gibt zurück:
      Timestamp in milliseconds
      Siehe auch:
    • getRssi

      public short getRssi()
      Gets the RSSI value of the scanned BLE module.

      It depends on the flag DiscoverySettings.isCalculatingRssiAverage() how the rssi value is calculated:

      • flag is true: The average value of all BLE frames is calculated.
      • flag is false: The value of the last BLE frames is taken.

      Note: BLE frames are only relevant if they are inside the RSSI range (see setting DiscoverySettings.setRssiThreshold(int)).

      This field is set for every scanned BLE module.

      Gibt zurück:
      RSSI value
      Siehe auch:
    • getMacAddress

      public String getMacAddress()
      Gets the MAC Address of the BLE module.

      This field is set for every scanned BLE module.

      Gibt zurück:
      MAC Address
    • getBlukiiId

      public String getBlukiiId()
      Gets the blukii Id of the BLE module.

      This field is set for blukii modules only.

      Gibt zurück:
      blukii Id
    • getDeviceName

      public String getDeviceName()
      Gets the Device Name (scan response) of the BLE module.

      This field is set for every scanned BLE module.

      Gibt zurück:
      Device Name
    • getDevice

      public android.bluetooth.BluetoothDevice getDevice()
      Gets the BluetoothDevice object of the BLE module.

      This field is set for every scanned BLE module.

      Gibt zurück:
      BluetoothDevice object
    • getEventBeaconState

      public CommonState getEventBeaconState()
      Gets the state if blukii is advertising event beacon values.

      This field is only valid for blukii Smart Beacons, since firmware 002.010.

      Gibt zurück:
      boolean state
    • getEnergySaveState

      public CommonState getEnergySaveState()
      Gets the state if blukii is advertising energy save frames.

      This field is only valid for blukii Smart Beacons since firmware 002.015 & since firmware 003.009

      Gibt zurück:
      CommonState state
    • getBeaconSensorData

      public BeaconSensorData getBeaconSensorData()
      Gets a data object of blukii sensor data.

      This field is only valid if sensor data has been received by blukii beacon, otherwise it is null.

      Important: BeaconSensorData is only received if DiscoverySettings.isScanBeaconSensorData() is set true.

      Gibt zurück:
      BeaconSensorData object, null if no blukii beacon sensor data has been received
      Siehe auch:
    • getFirmware

      public String getFirmware()
      Gets the firmware version of a blukii.
      Gibt zurück:
      Firmware version string, null if it is not supported
    • getProduct

      public String getProduct()
      Gets the product ID of a blukii.
      Gibt zurück:
      Product ID string, null if it is not supported
    • getHardware

      public String getHardware()
      Gets the hardware version of a blukii.
      Gibt zurück:
      Hardware version string, null if it is not supported
    • isServiceMode

      public boolean isServiceMode()
      Checks if blukii Service Mode is active.

      Service Mode is active for 30 seconds are re-inserting the battery.

      Gibt zurück:
      true, if blukii Service Mode is active
    • getEddystoneData

      public EddystoneData getEddystoneData()
      Gets a data object of Eddystone beacon data.

      This field is only valid if Eddystone UID, URL or TLM data has been received by blukii beacon, otherwise it is null.

      Important: EddystoneData is only received if DiscoverySettings.isScanEddystoneData() is set true.

      Gibt zurück:
      EddystoneData object, null if no Eddystone data has been received
      Siehe auch:
    • getiBeaconData

      public IBeaconData getiBeaconData()
      Gets a data object of iBeacon data.

      This field is only valid if iBeacon data has been received by blukii beacon, otherwise it is null.

      Important: IBeaconData is only received if DiscoverySettings.isScanIBeaconData() is set true.

      Gibt zurück:
      IBeaconData object, null if no iBeacon data has been received
      Siehe auch:
    • getDeviceTracing

      public DeviceTracing getDeviceTracing()
      Gets a data object of device tracing.
      Gibt zurück:
      DeviceTracing object, null if no DeviceTracing data has been received
      Siehe auch:
    • getSpecialEvent

      public SpecialEvent getSpecialEvent()
      Gets a data object of special event (tilt motion or button click).
      Gibt zurück:
      SpecialEvent object, null if no SpecialEvent data has been received
      Siehe auch:
    • getType

      public BlukiiType getType()
      Gets the module type as BlukiiType.
      Gibt zurück:
      module type
    • getSubType

      public BlukiiSubType getSubType()
      Gets the module sub type as BlukiiSubType.
      Gibt zurück:
      module sub type
    • getAdvInterval

      public int getAdvInterval()
      Gets the advertising interval of a blukii.

      This field is only valid for blukiis.

      Gibt zurück:
      advertising interval in milliseconds, 0 if is not a blukii
    • getBattery

      public int getBattery()
      Gets the battery level value of a blukii.
      Gibt zurück:
      Battery charge in percent, Integer.MIN_VALUE if it is not supported
    • getTxPower

      public short getTxPower()
      Gets the txPower value of a blukii.

      It stands for the physical hardware setting of the BLE sender.

      This field is only valid for blukiis.

      Gibt zurück:
      TxPower in dBm, Short.MIN_VALUE if it is not supported
    • describeContents

      public int describeContents()
      Angegeben von:
      describeContents in Schnittstelle android.os.Parcelable
    • writeToParcel

      public void writeToParcel(android.os.Parcel dest, int flags)
      Angegeben von:
      writeToParcel in Schnittstelle android.os.Parcelable