Builder
Functions
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.
Maximum number of cached GET responses retained before LRU eviction. Defaults to 100. Clamped to a 1-entry floor.
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.
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.
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.
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.
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.
Master toggle for non-HTTP SDK logs (geofencing, smartwalking, auth, etc.). Also acts as the default for enableHttpLogging when that is left unset.
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.
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.
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.
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.
Minimum severity for HTTP request/response logs. When unset, inherits from logLevel.
Minimum severity for non-HTTP SDK logs. Also acts as the default for httpLogLevel when that is left unset.
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.
Target cadence for the periodic background outbox flush, in milliseconds. Defaults to 900 000 ms (15 minutes).
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.
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.
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.
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.
Per-socket read/write inactivity timeout for SDK HTTP requests, in milliseconds. Defaults to 30 000 ms. Clamped to a 1 000 ms floor.
Whether the SDK should include manually-entered step samples in step and activity aggregates. Defaults to false.
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.