Skip to main content

Showing the banner

The banner has two layers. The first layer asks for consent with Accept and Reject. The preference center (second layer) lets the visitor turn individual categories on or off. Both are styled and translated from your dashboard.

Show the banner when configure reports that consent is still needed:

if (status.shouldCollectConsent) {
OptSensBanner.showFirstLayer(this)
}

Open the preference center directly with OptSensBanner.showSecondLayer(activity).

GDPR and CCPA require the visitor to be able to change consent at any time. On phone and tablet the floating button covers this, but unlike the web it is not injected for you: you mount it once during integration (Android attach, iOS overlay). Build your own control only if you have turned the button off, or on TV, where the button is not shown. Wire any control (a Settings row, a menu item) to the geo-aware reopen path. It shows "Your Privacy Choices" for a US privacy visitor and the preference center for everyone else.

OptSensBanner.showPreferences(activity)

The floating button is the ready-made version of this control. Banner design, languages and content are managed in your OptSens dashboard, not in the app.