Consent

actual class Consent(activity: Any?)

Manages consent and privacy forms using the Google User Messaging Platform (UMP) SDK.

This class helps you gather consent from your users, which is often a legal requirement (e.g., GDPR). The UMP SDK will attempt to display a privacy message that you configure in the "Privacy & messaging" tab of your AdMob account.

On Android, this class requires an Activity context. For other platforms, you can pass null.

expect class Consent(activity: Any?)

Manages consent and privacy forms using the Google User Messaging Platform (UMP) SDK.

This class helps you gather consent from your users, which is often a legal requirement (e.g., GDPR). The UMP SDK will attempt to display a privacy message that you configure in the "Privacy & messaging" tab of your AdMob account.

On Android, this class requires an Activity context. For other platforms, you can pass null.

actual class Consent(activity: Any?)

Manages consent and privacy forms using the Google User Messaging Platform (UMP) SDK.

This class helps you gather consent from your users, which is often a legal requirement (e.g., GDPR). The UMP SDK will attempt to display a privacy message that you configure in the "Privacy & messaging" tab of your AdMob account.

On Android, this class requires an Activity context. For other platforms, you can pass null.

Constructors

Link copied to clipboard
actual constructor(activity: Any?)
expect constructor(activity: Any?)
actual constructor(activity: Any?)

Properties

Link copied to clipboard

Indicates whether you can request ads.

Indicates whether you can request ads.

Indicates whether you can request ads.

Link copied to clipboard

Indicates whether a privacy options entry point is required.

Indicates whether a privacy options entry point is required.

Indicates whether a privacy options entry point is required.

Functions

Link copied to clipboard
actual fun canRequestAds(): Boolean

Checks if ads can be requested.

expect fun canRequestAds(): Boolean

Checks if ads can be requested.

actual fun canRequestAds(): Boolean

Checks if ads can be requested.

Link copied to clipboard

Checks if a privacy options entry point is required.

Checks if a privacy options entry point is required.

Checks if a privacy options entry point is required.

Link copied to clipboard
actual fun loadAndShowConsentForm(onLoaded: () -> Unit, onShown: () -> Unit, onError: (Exception) -> Unit)

Loads and shows a consent form if one is required.

expect fun loadAndShowConsentForm(onLoaded: () -> Unit = {}, onShown: () -> Unit = {}, onError: (Exception) -> Unit = {})

Loads and shows a consent form if one is required.

actual fun loadAndShowConsentForm(onLoaded: () -> Unit, onShown: () -> Unit, onError: (Exception) -> Unit)

Loads and shows a consent form if one is required.

Link copied to clipboard
actual fun requestConsentInfoUpdate(onCompletion: () -> Unit, onError: (Exception) -> Unit)

Requests an update of the user's consent information.

actual fun requestConsentInfoUpdate(params: ConsentRequestParameters, onCompletion: () -> Unit, onError: (Exception) -> Unit)

Requests an update of the user's consent information with specific parameters.

expect fun requestConsentInfoUpdate(onCompletion: () -> Unit = {}, onError: (Exception) -> Unit = {})

Requests an update of the user's consent information.

expect fun requestConsentInfoUpdate(params: ConsentRequestParameters, onCompletion: () -> Unit = {}, onError: (Exception) -> Unit = {})

Requests an update of the user's consent information with specific parameters.

actual fun requestConsentInfoUpdate(onCompletion: () -> Unit, onError: (Exception) -> Unit)

Requests an update of the user's consent information.

actual fun requestConsentInfoUpdate(params: ConsentRequestParameters, onCompletion: () -> Unit, onError: (Exception) -> Unit)

Requests an update of the user's consent information with specific parameters.

Link copied to clipboard
actual fun reset()

Resets the consent state.

expect fun reset()

Resets the consent state.

actual fun reset()

Resets the consent state.

Link copied to clipboard
actual fun showPrivacyOptionsForm(onDismissed: () -> Unit, onError: (Exception) -> Unit)

Shows the privacy options form.

expect fun showPrivacyOptionsForm(onDismissed: () -> Unit, onError: (Exception) -> Unit = {})

Shows the privacy options form.

actual fun showPrivacyOptionsForm(onDismissed: () -> Unit, onError: (Exception) -> Unit)

Shows the privacy options form.