-
Notifications
You must be signed in to change notification settings - Fork 0
Home
Ahmed Abbas edited this page May 27, 2026
·
2 revisions
The Convert Android SDK brings A/B testing, feature flags, and personalization to native Android applications. It resolves experiment and feature decisions on-device from a cached bucketing config, then batches, persists, and flushes tracking events in the background so nothing is lost when the network is unavailable.
Source Repository: android-sdk
flowchart TD
A0["ConvertSDK / Builder"]
A1["ConvertContext"]
A2["DataManager"]
A3["RuleManager"]
A4["BucketingManager"]
A5["ApiManager"]
A6["FeatureManager"]
A7["EventManager"]
A8["Android adapters"]
A9["WorkManager / EventFlushWorker"]
A0 -- "Creates" --> A1
A0 -- "Fetches config via" --> A5
A0 -- "Wires" --> A8
A0 -- "Fires events via" --> A7
A1 -- "Runs experiences via" --> A4
A1 -- "Runs features via" --> A6
A1 -- "Accesses data via" --> A2
A1 -- "Gates with" --> A3
A1 -- "Enqueues tracking via" --> A5
A5 -- "Persists offline via" --> A8
A5 -- "Schedules retry via" --> A9
A6 -- "Buckets via" --> A4
A2 -- "Fires events via" --> A7
The Android SDK shares the same architecture and bucketing algorithm as the JavaScript SDK, so variation assignment is deterministic and identical across SDKs. It is adapted for the Android runtime:
-
Builder, not constructor —
ConvertSDK.builder(context).sdkKey("...").build()replacesnew ConvertSDK(config). The primary constructor is internal. -
Coroutine-based async — Config fetch and event flush run on a long-lived SDK coroutine scope.
onReady { ... }gates your first decision call instead of a Promise. -
Android adapters — OkHttp for HTTP,
SharedPreferencesfor visitor/sticky state, an internal file for config cache, and SQLite for the offline event queue. -
Offline-safe by design — Events queue durably to disk and flush via WorkManager with exponential backoff; a
NetworkObservertriggers an immediate flush when connectivity returns. - Privacy-aware — The default visitor id is an app-scoped UUID v4 (no device identifiers, no PII), lost only on app uninstall.
-
Typed Kotlin models — Decisions return Kotlin data classes (
Variation,Feature) and enums (FeatureStatus,GoalDataKey,LogLevel); feature variables usekotlinx.serializationJsonElementwith scalar accessor extensions. -
Java interop —
@JvmOverloads,@JvmStatic, and SAM-convertiblefun interfacecallbacks make the SDK usable from Java without Kotlin glue.
- How Convert Works
- Architecture Overview
- Data Model Reference
- Quickstart Overview
- Requirements & Constraints
- Quickstart
- Installation
- Initialization
- Configuration Options
- Return Types & Models
- Code Examples
- Offline Behavior
- Tracking Control
- Google Play Data Safety
- Java Interop
- Experiences & Variations
- Feature Flags
- Bucketing Algorithm
- Rule Evaluation & Targeting
- Segments
- Data Management
- Event System
- API Communication & Tracking
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
Contributing