-
Notifications
You must be signed in to change notification settings - Fork 0
Configuration
Ahmed Abbas edited this page Aug 7, 2026
·
4 revisions
Every option is set through a ConvertSDK.Builder method and is optional except sdkKey(...) or data(...). Set what you need and leave the rest at their defaults. All options mirror the Convert JS SDK's Config type — if you are porting from the JS SDK, each field is reachable through a camelCase builder setter.
val sdk = ConvertSDK.builder(applicationContext)
.sdkKey("YOUR_SDK_KEY")
.environment("prod")
.dataRefreshInterval(600_000)
.logLevel(LogLevel.INFO)
.build()| Method | Purpose | Default |
|---|---|---|
sdkKey(value) |
Merchant-facing SDK key | required (unless data supplied) |
sdkKeySecret(value) |
Confidential SDK secret — used when the server requires signed requests | null |
debugToken(value) |
QA debug token; widens config visibility to draft/paused entities and disables the on-disk config cache | null |
data(config) |
Pre-fetched ConfigResponseData; bypasses the initial network fetch |
null |
environment(value) |
"staging" / "prod" hint forwarded with every request |
"staging" |
configEndpoint(url) |
Override the config-fetch URL (staging / on-prem) | Convert CDN |
trackEndpoint(url) |
Override the tracking URL (staging / on-prem) | Convert tracking endpoint |
dataRefreshInterval(millis) |
Config re-fetch interval |
300_000 (5 min) |
batchSize(size) |
Maximum events per outbound batch | 10 |
releaseInterval(millis) |
Minimum delay between flushes |
1_000 (1 s) |
hashSeed(seed) |
MurmurHash3 seed for bucketing | 9999 |
maxTraffic(basisPoints) |
Total traffic basis for bucketing | 10000 |
excludeExperienceIdHash(bool) |
Legacy-account bucketing compatibility | false |
logLevel(level) |
Minimum log severity | DEBUG |
trackingEnabled(bool) |
Boot-time tracking switch | true |
cacheLevel(level) |
HTTP cache directive hint ("default" / "low") |
"default" |
rulesKeysCaseSensitive(bool) |
Rule-engine key case sensitivity | true |
rulesNegation(str) |
Rule-engine negation semantics | library default |
The builder also exposes parity setters that exist so the full JS Config surface is reachable from Android. Set them only when matching specific JS-SDK behavior:
-
rulesComparisonProcessor(value)— the rule-engine comparison-processor identifier (rules.comparisonProcessorin the JS SDK). -
networkSource(value)— the platformnetwork.sourceidentifier appended to tracking payloads. Defaults to"android-sdk"; set it only to override (e.g.networkSource("android-sdk")). The-sdksuffix matches the tracking server's source whitelist and self-documents the integration in server logs. -
mapper(value)— an opaque consumer-supplied object reserved for JS-SDK response-mapping parity.
-
logLevelacceptsLogLevel.ERROR,WARN,INFO,DEBUG,TRACE, orSILENT. The floor is inclusive —INFOemits error/warn/info and drops debug. The default isDEBUG, which is deliberately chatty for integration work: set an explicitlogLevelfor production builds (INFOorERROR), orSILENTto drop every line.TRACEcurrently emits the same set asDEBUG— the logger has no separate trace sink. See Logging. -
trackingEnabled(false)is the boot-time equivalent ofsdk.setTrackingEnabled(false)— useful when consent is unknown at launch. Flip it at runtime once consent resolves. See Tracking Control. -
dataRefreshIntervaldrives the foreground config-refresh loop. The loop runs only while the app is in the foreground and only after the first config has loaded. -
hashSeed,maxTraffic,excludeExperienceIdHashaffect bucketing math. Leave them at their defaults unless you are matching a legacy account's bucketing — see the shared Bucketing Algorithm doc. -
debugTokenis a QA credential, not a production option. While it is set, every config request carries the token plus a forced low-cache hint, and the on-disk config cache is neither read nor written — so a QA build always sees fresh config, including draft and paused entities. The token is never sent to the tracking endpoint, and it is redacted from the SDK's own log output (both in the rendered config and in failed-request URLs). Generate one from your Convert dashboard. See the shared QA & Preview guide.
import com.convert.sdk.core.model.LogLevel
ConvertSDK.builder(context)
.sdkKey("YOUR_SDK_KEY")
.logLevel(LogLevel.DEBUG)
.build()The SDK logs through android.util.Log under the tag ConvertSDK. Capture logs with:
adb logcat -s ConvertSDK:V-
Initialization — builder usage,
onReady, direct-data mode -
Return Types & Models —
LogLeveland the other enums - Tracking Control — the tracking switch in depth
Copyrights © 2026 All Rights Reserved by Convert Insights, Inc.
Getting Started
Android SDK
- Quickstart
- Installation
- Initialization
- Configuration
- Return Types & Models
- Code Examples
- Offline Behavior
- Tracking Control
- Google Play Data Safety
- Java Interop
Core Concepts
- Experiences & Variations
- Feature Flags
- Bucketing Algorithm
- Rule Evaluation
- Segments
- Data Management
- Event System
- API Communication
How-To Guides
- Running Experiences
- Running Features
- Tracking Conversions
- Visitor Context
- Persistent DataStore
- Troubleshooting
- Direct Tracking Endpoint
- QA & Preview
- Mutually Exclusive Experiments
Contributing