ConsentMode
Strategy for handling user consent via Google's UMP before SDK initialization. Choose based on your app's consent requirements and target regions.
GatherBeforeInitialize: The canonical mode. Requests a UMP consent-info update and shows the consent form if the user's region/config requires it (loadAndShowConsentFormIfRequired); then initializes ads if ConsentController.canRequestAds is true. In regions where consent is not required, no form is shown and ads still serve.
InitializeOnlyIfAlreadyAllowed: Requests a UMP update but never shows a form; initializes only if consent was already obtained (e.g. from a prior session).
SkipConsent: Bypasses UMP entirely and forces the ad-request gate open. Intended for testing or non-consent regions only; not for EEA/UK production without your own consent handling.
Properties
Functions
Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)
Returns an array containing the constants of this enum type, in the order they're declared.