Skip to main content

Terms and Privacy Policy Flow

The SDK ships a built-in consent flow based on Google UMP (IAB TCF v2). It detects the user's region, shows the consent form only where required, and applies the result to every mediated ad network automatically.

Call requestConsent on your launch activity and initialize the SDK from its callback:

EMAManager.requestConsent(this) {
EMAManager.init(
EMAConfiguration.Builder(application, "YOUR_APP_AD_IDENTIFIER").build()
)
}
note

Once consent is resolved, the SDK applies it to all ad networks. You do not need to bridge consent to any network yourself.

GDPR requires an entry point where users can revisit their consent choices. isPrivacyOptionsRequired tells you whether that applies to the current user (call it after the consent flow), and showPrivacyOptionsForm opens the form. A common placement is an item in your settings screen, but any entry point works.

if (EMAManager.isPrivacyOptionsRequired(context)) {
privacyOptionsItem.isVisible = true
privacyOptionsItem.setOnClickListener {
EMAManager.showPrivacyOptionsForm(this)
}
}