Android SDK - Privacy signals
Set privacy signals and initialize
Timing
isChildDirected— must be set beforeinit()and cannot be changed after initialization.userConsentanddoNotSell— should be set beforeinit(), but can be updated later in the session if the user changes their preferences in the app.
import com.aurion11.sirius.sdk.A11
class MyApplication : Application() {
override fun onCreate() {
super.onCreate()
// Privacy signals — set before init
A11.privacy.setDoNotSell(false)
A11.privacy.setChildDirected(false)
// GDPR — per-vendor consent
A11.privacy.setUserConsent(
UserConsent(
jurisdiction = UserConsent.Jurisdiction.GDPR,
consents = mapOf(
Vendor.GOOGLE_ADMOB.vendorId to true,
Vendor.META_AUDIENCE_NETWORK.vendorId to true,
Vendor.UNITY_ADS.vendorId to true
// ... add all relevant vendors
)
)
)
// Initialize — call once
A11.init(this, "YOUR_APP_KEY", listOf("https://your-host-url.com"))
}
}
How privacy signals propagate
The SDK forwards each signal to the corresponding API of every integrated ad network that supports it. If a signal is not provided, nothing is set and each ad network falls back to its own default behaviour.
Ad networks that are IAB TCF-certified read the TCF string directly from SharedPreferences. The publisher is responsible for ensuring a valid TCF string is written here — either via certified CMP or directly when managing consent without one. If both TCF string and setUserConsent are set for a specific ad network, it is up to each ad network to determine which one takes precedence.
When isChildDirected is set to true, A11 Mediation automatically suppresses ad requests to networks that serve interest-based advertising only — no additional publisher configuration is required.
Publisher action required for certain networks
Some integrated networks do not expose a privacy API or do not allow deterministic signal mapping. A11 Mediation does not propagate privacy signals to these networks. Additionally, when AdMob or Google Ad Manager (GAM) mediation is active, publishers must configure privacy on AdMob/GAM's own mediated SDKs directly.
When LevelPlay mediation is active, A11 Mediation sets privacy signals on the LevelPlay SDK only. Publishers must check how LevelPlay passes these signals to the ad networks it mediates.
Publishers must take these steps before calling A11.init(), in accordance with the network's technical documentation and any applicable contractual obligations.
See the full Network privacy reference for the required action per network. If you are unsure which steps apply to your integration, contact your Aurion11 representative.
Passing consent without a CMP
If you collect consent outside a standard CMP — for example, through a custom consent screen or a server-side record — pass it manually via setUserConsent() before calling init():