-
@Serializable() public final class BleConfigurationExperimental BLE-advertisement collection config. Defaults to disabled — the server does not send a
bleblock yet, so BLE only runs when a local override forces it on (see com.doorstepai.sdks.tracking.DebugCollectionConfig). When the server later adds this block (phase 3), flippingenabledhere is all that's needed to control BLE scanning remotely.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description public classBleConfiguration.Companion
-
Field Summary
Fields Modifier and Type Field Description private final Booleanenabledprivate final IntegerscanModeprivate final LongreportDelayMsprivate final IntegercallbackTypeprivate final IntegermatchModeprivate final IntegernumOfMatchesprivate final BooleanlegacyOnlyprivate final LongrestartIntervalMsprivate final List<String>serviceUuidsprivate final List<Integer>manufacturerIdsprivate final BooleancycleScannerEnabledprivate final LongcycleIntervalMs
-
Constructor Summary
Constructors Constructor Description BleConfiguration(Boolean enabled, Integer scanMode, Long reportDelayMs, Integer callbackType, Integer matchMode, Integer numOfMatches, Boolean legacyOnly, Long restartIntervalMs, List<String> serviceUuids, List<Integer> manufacturerIds, Boolean cycleScannerEnabled, Long cycleIntervalMs)
-
Method Summary
Modifier and Type Method Description final BooleangetEnabled()final IntegergetScanMode()Android ScanSettingsscan mode: 0=LOW_POWER, 1=BALANCED, 2=LOW_LATENCY (fastest).final LonggetReportDelayMs()Batch reporting delay (ms). final IntegergetCallbackType()ScanSettingscallback type: 1=ALL_MATCHES, 2=FIRST_MATCH, 4=MATCH_LOST (API 23+).final IntegergetMatchMode()ScanSettingsmatch mode: 1=AGGRESSIVE, 2=STICKY (API 23+).final IntegergetNumOfMatches()ScanSettingsnumber of matches: 1=ONE, 2=FEW, 3=MAX_ADVERTISEMENT (API 23+).final BooleangetLegacyOnly()setLegacy: true = only legacy (pre-5.0) advertisements; false = also extended adv (API 26+). final LonggetRestartIntervalMs()Tear down + restart the scan on this cadence to dodge the AOSP 30-minute limit that downgrades a long-running scan to opportunistic mode. final List<String>getServiceUuids()BLE ScanFilters. final List<Integer>getManufacturerIds()Company ids to match (e.g. final BooleangetCycleScannerEnabled()Destroy-and-recreate the scanner on a short cadence to continually observe repeat advertisements from already-seen devices. final LonggetCycleIntervalMs()Cadence for the cycleScannerEnabled destroy/recreate. -
-
Constructor Detail
-
BleConfiguration
BleConfiguration(Boolean enabled, Integer scanMode, Long reportDelayMs, Integer callbackType, Integer matchMode, Integer numOfMatches, Boolean legacyOnly, Long restartIntervalMs, List<String> serviceUuids, List<Integer> manufacturerIds, Boolean cycleScannerEnabled, Long cycleIntervalMs)
-
-
Method Detail
-
getEnabled
final Boolean getEnabled()
-
getScanMode
final Integer getScanMode()
Android
ScanSettingsscan mode: 0=LOW_POWER, 1=BALANCED, 2=LOW_LATENCY (fastest).
-
getReportDelayMs
final Long getReportDelayMs()
Batch reporting delay (ms). 0 = deliver each advertisement immediately (no batching).
-
getCallbackType
final Integer getCallbackType()
ScanSettingscallback type: 1=ALL_MATCHES, 2=FIRST_MATCH, 4=MATCH_LOST (API 23+).
-
getMatchMode
final Integer getMatchMode()
ScanSettingsmatch mode: 1=AGGRESSIVE, 2=STICKY (API 23+).
-
getNumOfMatches
final Integer getNumOfMatches()
ScanSettingsnumber of matches: 1=ONE, 2=FEW, 3=MAX_ADVERTISEMENT (API 23+).
-
getLegacyOnly
final Boolean getLegacyOnly()
setLegacy: true = only legacy (pre-5.0) advertisements; false = also extended adv (API 26+).
-
getRestartIntervalMs
final Long getRestartIntervalMs()
Tear down + restart the scan on this cadence to dodge the AOSP 30-minute limit that downgrades a long-running scan to opportunistic mode. Coerced to a floor of 60 s in com.doorstepai.sdks.tracking.internal.sensors.BleManager.
-
getServiceUuids
final List<String> getServiceUuids()
BLE ScanFilters. When BOTH lists are empty the scan is filterless (wildcard) — the broadest survey, but Android returns ZERO results while the screen is OFF. Supplying at least one service UUID or manufacturer id makes it a FILTERED scan that keeps delivering with the screen off (at a reduced/batched cadence). Trade breadth for screen-off coverage. Default: empty (unfiltered wildcard).
-
getManufacturerIds
final List<Integer> getManufacturerIds()
Company ids to match (e.g. 76 = Apple, 6 = Microsoft, 117 = Samsung, 224 = Google).
-
getCycleScannerEnabled
final Boolean getCycleScannerEnabled()
Destroy-and-recreate the scanner on a short cadence to continually observe repeat advertisements from already-seen devices. A filterless
SCAN_MODE_LOW_LATENCYscan's results collapse after a few minutes because the BLE controller's onFound/dedup match table saturates and stops re-reporting known devices (observed on the S22U). Fully tearing down and re-registering the scan forces the controller to rebuild that table, so repeats resume. Whenfalse(default) the scan is only bounced on the slow restartIntervalMs cadence (30-min opportunistic avoidance).
-
getCycleIntervalMs
final Long getCycleIntervalMs()
Cadence for the cycleScannerEnabled destroy/recreate. Coerced to a floor in com.doorstepai.sdks.tracking.internal.sensors.BleManager to stay under the platform's "5 scan starts / 30 s" limit (which otherwise blocks scans with error 6, SCANNING_TOO_FREQUENTLY). Default 10 s (≈3 starts/30 s).
-
-
-
-