Skip to content

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.

Data flow: the app’s core sends signals to a local test host in QA mode, or to Quameleon Cloud in production mode

  1. 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 with adb 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, or QA_ACTIVATION=true).
  2. The SDK sees the token, starts a TCP server bound to 127.0.0.1 only, and waits for a hello with the same token.
  3. The host connects (through adb forward on Android), sends action.begin before each step, and receives every signal stamped with that step’s action_id.
  4. Without a token, nothing starts: no socket, no thread, no buffer.
  1. The app calls startProduction({ apiKey, endpoint, publicKey }) early in startup.
  2. The SDK applies the cached remote config, fetches a fresh one in the background, and decides sampling per user session.
  3. Signals are written to an on-device spool, encrypted with a per-session AES-256 data key when a public key is set.
  4. An uploader sends gzipped batches to POST /v1/ingest every 30 seconds (sooner when 200 signals are pending), and sampled replay frames to POST /v1/replay. Retries are idempotent; the server dedupes on (session_id, seq).
  5. 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.

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.