Android SDK · Preview
Consent and privacy
Connect your consent dialog, manage purpose-level decisions and control advertising identifiers on Android.
Preview: planned API
The Android SDK is in development and not published yet. This page describes the API we are building so you can plan your integration. Package names, signatures and defaults may still change before the first release.
Without a stored decision or a consent option the SDK starts as granted, like the Web SDK. If you ask for consent first, initialize with a pending state and update it when the customer decides. Decisions are stored on the device.
// When the visitor decides in your consent dialog
RTN.setConsent(ConsentState.GRANTED)
// Purpose-level decisions
RTN.setConsentPurpose(ConsentPurpose.ADVERTISING, ConsentState.GRANTED)
val ads = RTN.getConsentPurpose(ConsentPurpose.ADVERTISING)
// Stop and restart collection without losing identity
RTN.pause()
RTN.resume()Consent purposes
| Purpose | Controls |
|---|---|
analytics | Event collection and delivery. Set by setConsent. |
personalization | Using events for personalized messages and recommendations |
advertising | Advertising identifiers and syncing the customer to ad audiences |
audiences | Including the customer in segments shared with ad platforms |
probabilistic_attribution | Matching installs without a deterministic identifier |
While analytics is pending, events are kept on the device and sent once it is granted. When it is denied, queued events are deleted and nothing is collected.
Advertising identifiers
The SDK reads the Google Advertising ID only when collectAdvertisingId = true and the advertising purpose is granted. It honors the "Delete advertising ID" setting and never collects it from children-directed apps (childDirected = true).
Data deletion
reset clears the known customer and starts a new anonymous identity on the device. To erase a customer's data, use the deletion request in the dashboard or the server API; the SDK does not delete server-side data.