Klasse DiscoverySettings
- Alle implementierten Schnittstellen:
android.os.Parcelable
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 KlassenModifizierer und TypKlasseBeschreibungstatic classHelper for Default Filter ListsVon Schnittstelle geerbte verschachtelte Klassen/Schnittstellen android.os.Parcelable
android.os.Parcelable.ClassLoaderCreator<T>, android.os.Parcelable.Creator<T> -
Feldübersicht
FelderModifizierer und TypFeldBeschreibungstatic final android.os.Parcelable.Creator<DiscoverySettings> static final intDefault value for rssi threshold: -85.static final intMaximum value for rssi threshold: -20.static final intMinimum value for rssi threshold: -120.static final intScan duration of one discovery phase: 5000 milliseconds.static final intScan mode with balanced power consumption and scan frequency:ScanSettings.SCAN_MODE_BALANCED.static final intScan mode with high power consumption and scan frequency:ScanSettings.SCAN_MODE_LOW_LATENCY.static final intScan mode with low power consumption and scan frequency:ScanSettings.SCAN_MODE_LOW_POWER.static final intScan 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 TypMethodeBeschreibungintintGets the discovery profile.intGets the rssi threshold for the discovery.intGets the duration of one discovery phase.intGets the scan mode concerning power consumption and scan frequency.intGets the wait duration between two discovery phases.booleanGets the state if discovery should calculate the average RSSI of all scanned frames.booleanGets the state if discovery should list every frame in the result list.booleanGets the state if blukii monitoring is enabled.booleanGets the state if discovery should be continued after reboot of Android.booleanGets the state if discovery should scan for sensor data of blukii beacons.booleanGets the state if discovery should scan for basic blukii data like firmware, advertising interval etc.booleanGets the state if discovery should scan for device tracing packets.booleanGets the state if discovery should scan for Eddystone data.booleanGets the state if discovery should scan for iBeacon data.booleanGets the state if discovery should scan for non blukii BLE modules.booleanGets the state if discovery should scan for special event packets.voidsetCalculatingRssiAverage(boolean calculatingRssiAverage) Sets the state if discovery should calculate the average RSSI of all scanned frames.voidsetForegroundServiceNotificationData(NotificationData foregroundServiceNotificationData) Sets the notification data for a discovery foreground service.voidsetListEveryFrame(boolean listEveryFrame) Sets the state if discovery should list every frame in the result list or not.voidsetMonitoringEnabled(boolean enabled) Gets the state if blukii monitoring is enabled.voidsetPersisted(boolean persisted) Gets the state if discovery should be continued after reboot of Android.voidsetProfile(int profile) Sets the discovery profile.voidsetRssiThreshold(int rssiThreshold) Sets the rssi threshold for the discovery.voidsetScanBeaconSensorData(boolean scanBeaconSensorData) Sets the state if discovery should scan for sensor data of blukii beacons.voidsetScanBlukiiData(boolean scanBlukiiData) Sets the state if discovery should scan for sensor data of blukii beacons.voidsetScanDeviceTracingData(boolean scanDeviceTracingData) Sets the state if discovery should scan for device tracing packets.voidsetScanDuration(int scanDuration) Gets the duration of one discovery phase.voidsetScanEddystoneData(boolean scanEddystoneData) Sets the state if discovery should scan for Eddystone data.voidsetScanFilters(List<android.bluetooth.le.ScanFilter> filters) Sets a list of Bluetooth LE ScanFiltersvoidsetScanIBeaconData(boolean scanIBeaconData) Sets the state if discovery should scan for iBeacon data.voidsetScanMode(int scanMode) Sets the scan mode concerning power consumption and scan frequency.voidsetScanNonBlukiis(boolean scanNonBlukiis) Sets the state if discovery should also scan for non blukii BLE modules.voidsetScanSpecialEventData(boolean scanSpecialEventData) Sets the state if discovery should scan for special event packets.voidsetScanWaitDuration(int scanWaitTime) Sets the wait duration between two discovery phases.voidwriteToParcel(android.os.Parcel parcel, int i)
-
Felddetails
-
RSSI_MAX
public static final int RSSI_MAXMaximum value for rssi threshold: -20.- Siehe auch:
-
RSSI_MIN
public static final int RSSI_MINMinimum value for rssi threshold: -120.- Siehe auch:
-
RSSI_DEFAULT
public static final int RSSI_DEFAULTDefault value for rssi threshold: -85.- Siehe auch:
-
SCANMODE_LOWPOWER
public static final int SCANMODE_LOWPOWERScan mode with low power consumption and scan frequency:ScanSettings.SCAN_MODE_LOW_POWER.- Siehe auch:
-
SCANMODE_BALANCED
public static final int SCANMODE_BALANCEDScan mode with balanced power consumption and scan frequency:ScanSettings.SCAN_MODE_BALANCED.- Siehe auch:
-
SCANMODE_LOWLATENCY
public static final int SCANMODE_LOWLATENCYScan mode with high power consumption and scan frequency:ScanSettings.SCAN_MODE_LOW_LATENCY.- Siehe auch:
-
SCANDURATION_DEFAULT
public static final int SCANDURATION_DEFAULTScan duration of one discovery phase: 5000 milliseconds.- Siehe auch:
-
SCANWAITDURATION_DEFAULT
public static final int SCANWAITDURATION_DEFAULTScan wait duration wait duration between two discovery phases.- Siehe auch:
-
CREATOR
-
-
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_MINandRSSI_MAX.- Parameter:
rssiThreshold- rssi threshold value, default isRSSI_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
ScanSettingsclass 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
ScanSettingsclass of the android.bluetooth.le library:- Parameter:
scanMode- scan mode, default isSCANMODE_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
DiscoveryDataand returned by callbackBlukiiClient.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
DiscoveryDataand returned by callbackBlukiiClient.OnDiscoveryListener.onDiscoveryResult(List).See also
getScanWaitDuration()to optimize the discovery concerning power consumption.- Parameter:
scanDuration- scan duration in milliseconds, default isSCANDURATION_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 seesetProfile(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 seesetProfile(int).- Parameter:
scanWaitTime- scan wait duration in milliseconds, default isSCANWAITDURATION_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
DiscoveryProfilefor 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
DiscoveryProfilefor more information.- Parameter:
profile- discovery profile, default isDiscoveryProfile.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
DiscoveryDatadata is only supported for blukii modules:BeaconSensorDataand some value ofDiscoveryData.EddystoneDataandIBeaconDatais 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
DiscoveryDatadata is only supported for blukii modules:BeaconSensorDataand some value ofDiscoveryData.EddystoneDataandIBeaconDatais 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
DiscoveryDatamay contain a validBeaconSensorDataobject.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
DiscoveryDatamay contain a validBeaconSensorDataobject.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
DiscoveryDatamay contain a validBeaconSensorDataobject.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
DiscoveryDatamay contain a validEddystoneDataobject.- 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
DiscoveryDatamay contain a validEddystoneDataobject.- 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
DiscoveryDatamay contain a validIBeaconDataobject.- 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
DiscoveryDatamay contain a validIBeaconDataobject.- 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
DiscoveryDatamay contain a validDeviceTracingobject.- 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
DiscoveryDatamay contain a validTracedDeviceobject.- 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
DiscoveryDatamay contain a validSpecialEventobject.- 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
DiscoveryDatamay contain a validSpecialEventobject.- 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:
trueif 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:
trueevery received frame is listed as separateDiscoveryDatadata object.falseall received frames of one scan duration are summarized (default), so there is only oneDiscoveryDatadata object of each device.
- Parameter:
listEveryFrame-trueif every frame should be listed, otherwisefalse
-
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:
trueif 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-trueif blukii devices should be monitored, otherwisefalse
-
setScanFilters
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:
describeContentsin Schnittstelleandroid.os.Parcelable
-
writeToParcel
public void writeToParcel(android.os.Parcel parcel, int i) - Angegeben von:
writeToParcelin Schnittstelleandroid.os.Parcelable
-