ConsentForm

Kotlin|Java

public interfaceConsentForm


A rendered form for collecting consent from a user.

Summary

Nested types

Interface definition for a callback to be invoked when a consent form is dismissed.

Public methods

abstract void
show(
    Activity activity,
    ConsentForm.OnConsentFormDismissedListener onConsentFormDismissedListener
)

Shows the consent form.

Public methods

show

abstract void show(
    Activity activity,
    ConsentForm.OnConsentFormDismissedListener onConsentFormDismissedListener
)

Shows the consent form.

Parameters
Activity activity

The activity showing the consent form.

ConsentForm.OnConsentFormDismissedListener onConsentFormDismissedListener

The listener that gets called when the consent form is dismissed.

Except as otherwise noted, the content of this page is licensed under theCreative Commons Attribution 4.0 License, and code samples are licensed under theApache 2.0 License. For details, see theGoogle Developers Site Policies. Java is a registered trademark of Oracle and/or its affiliates.

Last updated 2025-08-20 UTC.