Builder

class Builder

Constructors

Link copied to clipboard
constructor()

Functions

Link copied to clipboard
Link copied to clipboard
Link copied to clipboard

Master switch for the SDK's in-memory GET response cache. Defaults to true. Set false to always hit the network — useful for apps that need strictly fresh data or are debugging stale reads.

Link copied to clipboard

Maximum number of cached GET responses retained before LRU eviction. Defaults to 100. Clamped to a 1-entry floor.

Link copied to clipboard

Time-to-live for cached GET responses, in milliseconds. Defaults to 900 000 ms (15 minutes). Clamped to a non-negative value; 0 effectively disables caching by expiring every entry immediately.

Link copied to clipboard

SDK app-registration identifier. Required for the unique-id auth method (signInOrCreateMember); recommended for host-injected tokens if you want the SDK to attempt /auth/refresh on 401 before emitting SESSION_EXPIRED. Not required for username/password (authenticateWithCredentials) members, who refresh and revoke through the mobileapi/authentication endpoints. See class KDoc for the full matrix.

Link copied to clipboard

SDK app-registration secret. Required for the unique-id auth method (signInOrCreateMember, used by /auth/token and /auth/revoke). Not required for the authenticateWithTokens host-injected flow or for username/password (authenticateWithCredentials) members — consumers integrating only via those methods can omit this field. See class KDoc for the full matrix.

Link copied to clipboard

Connection-establishment timeout for SDK HTTP requests, in milliseconds. Defaults to 15 000 ms. Raise it for high-latency networks; clamped to a 1 000 ms floor.

Link copied to clipboard

Toggle for HTTP request/response logs (Ktor Logging plugin). When unset, inherits from enableLogging. Set to false while leaving enableLogging true to silence the chatty HTTP body lines while keeping regular SDK logs.

Link copied to clipboard

Master toggle for non-HTTP SDK logs (geofencing, smartwalking, auth, etc.). Also acts as the default for enableHttpLogging when that is left unset.

Link copied to clipboard

How many days back the SDK probes for health data when establishing step/permission state. Defaults to 30. Apple platforms only — Android (Health Connect) ignores this. Clamped to a 1-day floor.

Link copied to clipboard

Minimum spacing between background (geofence-triggered) heartbeats, in milliseconds. Defaults to 300 000 ms (5 minutes). Only relevant when the heartbeat is enabled (see heartbeatEnabled). Clamped to a non-negative value.

Link copied to clipboard

Consumer opt-in for the location-tracking heartbeat. Defaults to disabled — the SDK never sends a live location signal unless the host explicitly enables it here.

Link copied to clipboard

Minimum spacing between foreground-triggered heartbeats, in milliseconds. Defaults to 30 000 ms. Only relevant when the heartbeat is enabled (see heartbeatEnabled). Clamped to a non-negative value.

Link copied to clipboard

Minimum severity for HTTP request/response logs. When unset, inherits from logLevel.

Link copied to clipboard

Minimum severity for non-HTTP SDK logs. Also acts as the default for httpLogLevel when that is left unset.

Link copied to clipboard
Link copied to clipboard

Number of automatic retries for transient failures on idempotent GET requests. Defaults to 2 (up to 3 total attempts). The SDK retries only on 5xx server responses and network I/O errors, using exponential backoff with jitter; 4xx responses (including 401, handled by token refresh) and non-GET mutations are never retried. Set 0 to disable. Clamped to the range 0..5.

Link copied to clipboard

Target cadence for the periodic background outbox flush, in milliseconds. Defaults to 900 000 ms (15 minutes).

Link copied to clipboard

Maximum age of an offline outbox event before it is discarded, in milliseconds. Defaults to 30 days. An event reported after this window is dropped rather than delivered. Clamped to a 1-hour floor to avoid accidentally discarding freshly-queued events.

Link copied to clipboard

Maximum number of offline events the outbox retains before evicting the oldest. Defaults to 500. Raise it for high event volume (dense geofence networks); lower it to cap memory/storage. Clamped to a 1-entry floor.

Link copied to clipboard

End-to-end request timeout (covering token refresh and retry) for SDK HTTP requests, in milliseconds. Defaults to 30 000 ms. Clamped to a 1 000 ms floor.

Link copied to clipboard

Target cadence for periodic SmartWalking step sync, in milliseconds. Defaults to 3 600 000 ms (1 hour). Android only — iOS sync is HealthKit-observer driven and ignores this. Clamped to the 15-minute WorkManager minimum.

Link copied to clipboard

Per-socket read/write inactivity timeout for SDK HTTP requests, in milliseconds. Defaults to 30 000 ms. Clamped to a 1 000 ms floor.

Link copied to clipboard

Whether the SDK should include manually-entered step samples in step and activity aggregates. Defaults to false.

Link copied to clipboard

How long before an access token's expiry the SDK proactively refreshes it, in milliseconds. Defaults to 300 000 ms (5 minutes). Larger values refresh earlier (more resilient to going offline near expiry); smaller values squeeze more life out of each token. Clamped to a non-negative value.