How it works
Every Quameleon adapter (React Native, native Android, native iOS, KMP) wraps the same framework-neutral core, one
in Kotlin and one in Swift. The core turns what happens in the app into signals: small JSON envelopes with a
kind (screen, tap, network, error, crash, hang, …), a name, flat typed props, the current screen
and a strictly increasing seq. The Signals reference lists every kind.
Only the sink changes between modes.
QA mode
Section titled “QA mode”- The host (
quameleon-qa record, a QualGent runner or your test) generates a random token of at least 16 characters and launches the app with it (adb shell am start ... --es quameleon_token <T>on Android,xcrun simctl launch ... -quameleon_token <T>on iOS). On Android it first writes a hash of the token withadb shell settings put global quameleon_qa_token …, which only adb can write: the SDK ignores a token that doesn’t match it, so another app on the device can’t activate QA mode by launching yours. QA mode also only runs in QA builds (debuggable, orQA_ACTIVATION=true). - The SDK sees the token, starts a TCP server bound to
127.0.0.1only, and waits for ahellowith the same token. - The host connects (through
adb forwardon Android), sendsaction.beginbefore each step, and receives every signal stamped with that step’saction_id. - Without a token, nothing starts: no socket, no thread, no buffer.
Production mode
Section titled “Production mode”- The app calls
startProduction({ apiKey, endpoint, publicKey })early in startup. - The SDK applies the cached remote config, fetches a fresh one in the background, and decides sampling per user session.
- Signals are written to an on-device spool, encrypted with a per-session AES-256 data key when a public key is set.
- An uploader sends gzipped batches to
POST /v1/ingestevery 30 seconds (sooner when 200 signals are pending), and sampled replay frames toPOST /v1/replay. Retries are idempotent; the server dedupes on(session_id, seq). - Quameleon Cloud decrypts each batch, upserts the device, its version history, the person and the session, groups errors into issues and makes it all queryable in the dashboard.
Identity on every batch
Section titled “Identity on every batch”Each production batch header carries session_id (one app launch), user_session_id (spans launches), device_id
(one per install, see Devices), distinct_id (the identified user, see
Users and identify), platform, adapter, sdk_version, and the device and app
objects (model, OS, app version and build). That is what makes every signal traceable to a customer, a device, an app
build and an SDK version.