Klasse DiscoverySettings

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

public final class DiscoverySettings extends Object implements android.os.Parcelable
Property set of settings to configure the discovering process.

The DiscoverySettings properties are affecting the discovery process that is started by BlukiiClient.startDiscovery() and the DiscoveryData contents of the result callbacks.

You can access the DiscoverySettings by calling BlukiiClient.getDiscoverySettings().

Every settings value is writable and has a default value that is used if not changed by the developer.

Siehe auch:
  • Verschachtelte Klassen - Übersicht

    Verschachtelte Klassen
    Modifizierer und Typ
    Klasse
    Beschreibung
    static class 
    Helper for Default Filter Lists

    Von Schnittstelle geerbte verschachtelte Klassen/Schnittstellen android.os.Parcelable

    android.os.Parcelable.ClassLoaderCreator<T>, android.os.Parcelable.Creator<T>
  • Feldübersicht

    Felder
    Modifizierer und Typ
    Feld
    Beschreibung
    static final android.os.Parcelable.Creator<DiscoverySettings>
     
    static final int
    Default value for rssi threshold: -85.
    static final int
    Maximum value for rssi threshold: -20.
    static final int
    Minimum value for rssi threshold: -120.
    static final int
    Scan duration of one discovery phase: 5000 milliseconds.
    static final int
    Scan mode with balanced power consumption and scan frequency: ScanSettings.SCAN_MODE_BALANCED.
    static final int
    Scan mode with high power consumption and scan frequency: ScanSettings.SCAN_MODE_LOW_LATENCY.
    static final int
    Scan mode with low power consumption and scan frequency: ScanSettings.SCAN_MODE_LOW_POWER.
    static final int
    Scan wait duration wait duration between two discovery phases.

    Von Schnittstelle geerbte Felder android.os.Parcelable

    CONTENTS_FILE_DESCRIPTOR, PARCELABLE_WRITE_RETURN_VALUE
  • Methodenübersicht

    Modifizierer und Typ
    Methode
    Beschreibung
    int
     
    int
    Gets the discovery profile.
    int
    Gets the rssi threshold for the discovery.
    int
    Gets the duration of one discovery phase.
    int
    Gets the scan mode concerning power consumption and scan frequency.
    int
    Gets the wait duration between two discovery phases.
    boolean
    Gets the state if discovery should calculate the average RSSI of all scanned frames.
    boolean
    Gets the state if discovery should list every frame in the result list.
    boolean
    Gets the state if blukii monitoring is enabled.
    boolean
    Gets the state if discovery should be continued after reboot of Android.
    boolean
    Gets the state if discovery should scan for sensor data of blukii beacons.
    boolean
    Gets the state if discovery should scan for basic blukii data like firmware, advertising interval etc.
    boolean
    Gets the state if discovery should scan for device tracing packets.
    boolean
    Gets the state if discovery should scan for Eddystone data.
    boolean
    Gets the state if discovery should scan for iBeacon data.
    boolean
    Gets the state if discovery should scan for non blukii BLE modules.
    boolean
    Gets the state if discovery should scan for special event packets.
    void
    setCalculatingRssiAverage(boolean calculatingRssiAverage)
    Sets the state if discovery should calculate the average RSSI of all scanned frames.
    void
    setForegroundServiceNotificationData(NotificationData foregroundServiceNotificationData)
    Sets the notification data for a discovery foreground service.
    void
    setListEveryFrame(boolean listEveryFrame)
    Sets the state if discovery should list every frame in the result list or not.
    void
    setMonitoringEnabled(boolean enabled)
    Gets the state if blukii monitoring is enabled.
    void
    setPersisted(boolean persisted)
    Gets the state if discovery should be continued after reboot of Android.
    void
    setProfile(int profile)
    Sets the discovery profile.
    void
    setRssiThreshold(int rssiThreshold)
    Sets the rssi threshold for the discovery.
    void
    setScanBeaconSensorData(boolean scanBeaconSensorData)
    Sets the state if discovery should scan for sensor data of blukii beacons.
    void
    setScanBlukiiData(boolean scanBlukiiData)
    Sets the state if discovery should scan for sensor data of blukii beacons.
    void
    setScanDeviceTracingData(boolean scanDeviceTracingData)
    Sets the state if discovery should scan for device tracing packets.
    void
    setScanDuration(int scanDuration)
    Gets the duration of one discovery phase.
    void
    setScanEddystoneData(boolean scanEddystoneData)
    Sets the state if discovery should scan for Eddystone data.
    void
    setScanFilters(List<android.bluetooth.le.ScanFilter> filters)
    Sets a list of Bluetooth LE ScanFilters
    void
    setScanIBeaconData(boolean scanIBeaconData)
    Sets the state if discovery should scan for iBeacon data.
    void
    setScanMode(int scanMode)
    Sets the scan mode concerning power consumption and scan frequency.
    void
    setScanNonBlukiis(boolean scanNonBlukiis)
    Sets the state if discovery should also scan for non blukii BLE modules.
    void
    setScanSpecialEventData(boolean scanSpecialEventData)
    Sets the state if discovery should scan for special event packets.
    void
    setScanWaitDuration(int scanWaitTime)
    Sets the wait duration between two discovery phases.
    void
    writeToParcel(android.os.Parcel parcel, int i)
     

    Von Klasse geerbte Methoden java.lang.Object

    equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Felddetails

  • Methodendetails

    • getRssiThreshold

      public int getRssiThreshold()
      Gets the rssi threshold for the discovery.

      BLE modules with a higher rssi value will be discovered only.

      Gibt zurück:
      rssi threshold value, default is RSSI_DEFAULT
      Siehe auch:
    • setRssiThreshold

      public void setRssiThreshold(int rssiThreshold)
      Sets the rssi threshold for the discovery.

      BLE modules with a higher rssi value will be discovered only.

      The valid range for the rssi threshold is limited by RSSI_MIN and RSSI_MAX.

      Parameter:
      rssiThreshold - rssi threshold value, default is RSSI_DEFAULT
      Siehe auch:
    • getScanMode

      public int getScanMode()
      Gets the scan mode concerning power consumption and scan frequency.

      The values are integer values derived from the ScanSettings class of the android.bluetooth.le library:

      Gibt zurück:
      scan mode, default is SCANMODE_BALANCED
      Siehe auch:
    • setScanMode

      public void setScanMode(int scanMode)
      Sets the scan mode concerning power consumption and scan frequency.

      The values are integer values derived from the ScanSettings class of the android.bluetooth.le library:

      Parameter:
      scanMode - scan mode, default is SCANMODE_BALANCED
      Siehe auch:
    • getScanDuration

      public int getScanDuration()
      Gets the duration of one discovery phase.

      After the scan duration has finished all scanned BLE data is saved into a List of DiscoveryData and returned by callback BlukiiClient.OnDiscoveryListener.onDiscoveryResult(List).

      See also getScanWaitDuration() to optimize the discovery concerning power consumption.

      Gibt zurück:
      scan duration in milliseconds, default is SCANDURATION_DEFAULT.
      Siehe auch:
    • setScanDuration

      public void setScanDuration(int scanDuration)
      Gets the duration of one discovery phase.

      After the scan duration has finished all scanned BLE data is saved into a List of DiscoveryData and returned by callback BlukiiClient.OnDiscoveryListener.onDiscoveryResult(List).

      See also getScanWaitDuration() to optimize the discovery concerning power consumption.

      Parameter:
      scanDuration - scan duration in milliseconds, default is SCANDURATION_DEFAULT.
      Siehe auch:
    • getScanWaitDuration

      public int getScanWaitDuration()
      Gets the wait duration between two discovery phases.

      You can use this feature to minimize power consumption if you do not need an continuous scan.

      This setting only takes affect for DiscoveryProfile.ALTERNATE. Therefore see setProfile(int).

      Gibt zurück:
      scan wait duration in milliseconds, default is SCANWAITDURATION_DEFAULT.
      Siehe auch:
    • setScanWaitDuration

      public void setScanWaitDuration(int scanWaitTime)
      Sets the wait duration between two discovery phases.

      You can use this feature to minimize power consumption if you do not need an continuous scan.

      This setting only takes affect for DiscoveryProfile.ALTERNATE. Therefore see setProfile(int).

      Parameter:
      scanWaitTime - scan wait duration in milliseconds, default is SCANWAITDURATION_DEFAULT.
      Siehe auch:
    • getProfile

      public int getProfile()
      Gets the discovery profile.

      It defines whether BLE scan is running depending on the apps state (foreground, background, screen off).

      Please see class DiscoveryProfile for more information.

      Gibt zurück:
      discovery profile, default is DiscoveryProfile.FOREGROUND
      Siehe auch:
    • setProfile

      public void setProfile(int profile)
      Sets the discovery profile.

      It defines whether BLE scan is running depending on the apps state (foreground, background, screen off).

      Please see class DiscoveryProfile for more information.

      Parameter:
      profile - discovery profile, default is DiscoveryProfile.FOREGROUND
      Siehe auch:
    • isPersisted

      public boolean isPersisted()
      Gets the state if discovery should be continued after reboot of Android.

      Note: Activating this setting needs the RECEIVE_BOOT_COMPLETED permission in your app's manifest

      Gibt zurück:
      state if if discovery should be continued after reboot, default is false
    • setPersisted

      @RequiresPermission("android.permission.RECEIVE_BOOT_COMPLETED") public void setPersisted(boolean persisted)
      Gets the state if discovery should be continued after reboot of Android.

      Note: Activating this setting needs the RECEIVE_BOOT_COMPLETED permission in your app's manifest

      Parameter:
      persisted - state if if discovery should be continued after reboot, default is false
    • isScanNonBlukiis

      public boolean isScanNonBlukiis()
      Gets the state if discovery should scan for non blukii BLE modules.

      Note: the majority of DiscoveryData data is only supported for blukii modules: BeaconSensorData and some value of DiscoveryData. EddystoneData and IBeaconData is also supported for non blukii modules.

      Gibt zurück:
      state if non blukii BLE modules are scanned, default is false
      Siehe auch:
    • setScanNonBlukiis

      public void setScanNonBlukiis(boolean scanNonBlukiis)
      Sets the state if discovery should also scan for non blukii BLE modules.

      Note: the majority of DiscoveryData data is only supported for blukii modules: BeaconSensorData and some value of DiscoveryData. EddystoneData and IBeaconData is also supported for non blukii modules.

      Parameter:
      scanNonBlukiis - state if non blukii BLE modules are scanned, default is false
    • isScanBlukiiData

      public boolean isScanBlukiiData()
      Gets the state if discovery should scan for basic blukii data like firmware, advertising interval etc.
      Gibt zurück:
      state if basic blukii data is scanned, default is true
      Siehe auch:
    • setScanBlukiiData

      public void setScanBlukiiData(boolean scanBlukiiData)
      Sets the state if discovery should scan for sensor data of blukii beacons.

      If this flag is set DiscoveryData may contain a valid BeaconSensorData object.

      Note: This flag is only relevant for blukii beacons

      Parameter:
      scanBlukiiData - state if basic blukii data is scanned, default is true
      Siehe auch:
    • isScanBeaconSensorData

      public boolean isScanBeaconSensorData()
      Gets the state if discovery should scan for sensor data of blukii beacons.

      If this flag is set DiscoveryData may contain a valid BeaconSensorData object.

      Note: This flag is only relevant for blukii beacons

      Gibt zurück:
      state if blukii beacon sensor data is scanned, default is false
      Siehe auch:
    • setScanBeaconSensorData

      public void setScanBeaconSensorData(boolean scanBeaconSensorData)
      Sets the state if discovery should scan for sensor data of blukii beacons.

      If this flag is set DiscoveryData may contain a valid BeaconSensorData object.

      Note: This flag is only relevant for blukii beacons

      Parameter:
      scanBeaconSensorData - state if blukii beacon sensor data is scanned, default is false
      Siehe auch:
    • isScanEddystoneData

      public boolean isScanEddystoneData()
      Gets the state if discovery should scan for Eddystone data.

      If this flag is set DiscoveryData may contain a valid EddystoneData object.

      Gibt zurück:
      state if Eddystone data is scanned, default is false
      Siehe auch:
    • setScanEddystoneData

      public void setScanEddystoneData(boolean scanEddystoneData)
      Sets the state if discovery should scan for Eddystone data.

      If this flag is set DiscoveryData may contain a valid EddystoneData object.

      Parameter:
      scanEddystoneData - state if Eddystone data is scanned, default is false
      Siehe auch:
    • isScanIBeaconData

      public boolean isScanIBeaconData()
      Gets the state if discovery should scan for iBeacon data.

      If this flag is set DiscoveryData may contain a valid IBeaconData object.

      Gibt zurück:
      state if iBeacon data is scanned, default is false
      Siehe auch:
    • setScanIBeaconData

      public void setScanIBeaconData(boolean scanIBeaconData)
      Sets the state if discovery should scan for iBeacon data.

      If this flag is set DiscoveryData may contain a valid IBeaconData object.

      Parameter:
      scanIBeaconData - state if iBeacon data is scanned, default is false
      Siehe auch:
    • isScanDeviceTracingData

      public boolean isScanDeviceTracingData()
      Gets the state if discovery should scan for device tracing packets.

      If this flag is set DiscoveryData may contain a valid DeviceTracing object.

      Gibt zurück:
      state if DeviceTracing data is scanned, default is false
      Siehe auch:
    • setScanDeviceTracingData

      public void setScanDeviceTracingData(boolean scanDeviceTracingData)
      Sets the state if discovery should scan for device tracing packets.

      If this flag is set DiscoveryData may contain a valid TracedDevice object.

      Parameter:
      scanDeviceTracingData - state if DeviceTracing data is scanned, default is false
      Siehe auch:
    • isScanSpecialEventData

      public boolean isScanSpecialEventData()
      Gets the state if discovery should scan for special event packets.

      If this flag is set DiscoveryData may contain a valid SpecialEvent object.

      Gibt zurück:
      state if SpecialEvent data is scanned, default is false
      Siehe auch:
    • setScanSpecialEventData

      public void setScanSpecialEventData(boolean scanSpecialEventData)
      Sets the state if discovery should scan for special event packets.

      If this flag is set DiscoveryData may contain a valid SpecialEvent object.

      Parameter:
      scanSpecialEventData - state if SpecialEvent data is scanned, default is false
      Siehe auch:
    • isCalculatingRssiAverage

      public boolean isCalculatingRssiAverage()
      Gets the state if discovery should calculate the average RSSI of all scanned frames.

      Otherwise the last found RSSI value is returned on DiscoveryData.getRssi()

      Gibt zurück:
      true if RSSI average is calculated
      Siehe auch:
    • setCalculatingRssiAverage

      public void setCalculatingRssiAverage(boolean calculatingRssiAverage)
      Sets the state if discovery should calculate the average RSSI of all scanned frames.

      Otherwise the last found RSSI value is returned on DiscoveryData.getRssi()

      Parameter:
      calculatingRssiAverage - state if RSSI average is calculated, default is false
      Siehe auch:
    • isEveryFrameListed

      public boolean isEveryFrameListed()
      Gets the state if discovery should list every frame in the result list.
      Gibt zurück:
      true if every frame is listed
    • setListEveryFrame

      public void setListEveryFrame(boolean listEveryFrame)
      Sets the state if discovery should list every frame in the result list or not.

      Values:

      • true every received frame is listed as separate DiscoveryData data object.
      • false all received frames of one scan duration are summarized (default), so there is only one DiscoveryData data object of each device.
      Parameter:
      listEveryFrame - true if every frame should be listed, otherwise false
    • isMonitoringEnabled

      public boolean isMonitoringEnabled()
      Gets the state if blukii monitoring is enabled. If enabled, data like Battery State of the blukii device is transferred to blukii Cloud.
      Gibt zurück:
      true if Monitoring enabled
    • setMonitoringEnabled

      public void setMonitoringEnabled(boolean enabled)
      Gets the state if blukii monitoring is enabled. If enabled, data like Battery State of the blukii device is transferred to blukii Cloud.
      Parameter:
      enabled - true if blukii devices should be monitored, otherwise false
    • setScanFilters

      public void setScanFilters(List<android.bluetooth.le.ScanFilter> filters)

      Sets a list of Bluetooth LE ScanFilters

      You can use a default filter list from DiscoverySettings.ScanFilters

      Parameter:
      filters - List of Bluetooth LE ScanFilters
    • setForegroundServiceNotificationData

      @RequiresPermission("android.permission.FOREGROUND_SERVICE") public void setForegroundServiceNotificationData(NotificationData foregroundServiceNotificationData)
      Sets the notification data for a discovery foreground service.

      If this value is not null, a foreground service is created for the complete duration of discovery.

      Default: null

      Parameter:
      foregroundServiceNotificationData - foreground service notification data
      Siehe auch:
    • describeContents

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

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