proximity-sdk / com.estimote.proximity_sdk.api / ProximityObserverBuilder

ProximityObserverBuilder

class ProximityObserverBuilder

Builder for configuring new ProximityObserver objects.

Parameters

applicationContext - the context of your app.

cloudCredentials - EstimoteCloudCredentials object for authorizing within Estimote Cloud.

Author
Estimote Inc. (contact@estimote.com)

Constructors

<init>

ProximityObserverBuilder(applicationContext: Context, cloudCredentials: EstimoteCloudCredentials)

Builder for configuring new ProximityObserver objects.

Functions

build

fun build(): ProximityObserver

Builds the configured ProximityObserver.

onError

fun onError(onErrorAction: (Throwable) -> Unit): ProximityObserverBuilder

Specifies an action to be called whenever any error occurs. If not specified, all errors will be delivered through Log.e(...) by default.

withAnalyticsReportingDisabled

fun withAnalyticsReportingDisabled(): ProximityObserverBuilder

Disables Estimote Analytics for this ProximityObserver. It provides analytics info about visits in your zones. Enabled by default.

withBalancedPowerMode

fun withBalancedPowerMode(): ProximityObserverBuilder

Proximity observer will use mode with balance between scan reliability and battery drainage.

withEstimoteSecureMonitoringDisabled

fun withEstimoteSecureMonitoringDisabled(): ProximityObserverBuilder

Disables Estimote Secure Monitoring resolving. When enabled, it will try to decrypt scanned encrypted packets in addition to non-secure packets. When disabled, it will only scan for non-encrypted packets. Enabled by default.

withLowLatencyPowerMode

fun withLowLatencyPowerMode(): ProximityObserverBuilder

Proximity observer will use the most reliable mode, but may drain battery a lot.

withLowPowerMode

fun withLowPowerMode(): ProximityObserverBuilder

Proximity observer will use battery efficient mode, but the scanning won't be super reliable.

withScannerInForegroundService

fun withScannerInForegroundService(notification: Notification): ProximityObserverBuilder

Will make the observation process use scanner wrapped in a foreground service. This will display notification in the user's notifications bar, but will ensure that the scanning won't be killed by the system. Your scanning will be handled without any service by default.

withTelemetryReportingDisabled

fun withTelemetryReportingDisabled(): ProximityObserverBuilder

Disables periodical beacons' telemetry data reporting to Estimote cloud. It sends info such as battery level, temperature, or light level. Enabled by default.