Floating button
The floating button is a small on-screen button that appears after the visitor has consented. Tapping it reopens their choice, the same geo-aware path as Reopen consent. It uses the OptSens mark as its icon.
Its position and colors come from your dashboard, in the Floating button section of Banner Settings. It is shown by default. If you turn it off (available on the Business and Custom plans), it renders nothing and you surface re-consent from your own control instead.
- Android
- iOS / tvOS
Attach it after configure succeeds:
OptSensWidget.attach(this)
To keep it on screen across activities, call
OptSensWidget.autoAttach(application) once from your Application.
Add it as an overlay, shown whenever there is no banner to collect:
.overlay {
if !OptSens.shouldCollectConsent(), let config = OptSens.config() {
OptSensWidget(config: config) { showBanner = true }
}
}
Not shown on TV
On a native TV (Apple TV, Android TV, Fire TV) the floating button renders nothing. A remote cannot reliably focus a single corner button, so on TV you place a re-consent entry in your own menu instead. See Connected TV.
Plan gating
The floating button ships with the SDK on the Pro, Business and Custom plans, shown by default, with its position and colors configurable on all three. Turning it off entirely, to drive re-consent from your own control instead, is part of the Business and Custom plans; on Pro the floating button is always shown.