User Consent
The consent status indicates that the user has been presented with the consent form and has submitted a choice (either consent or withhold consent), making the consent information available for use. It does not indicate that the user has specifically consented to personalized ads — only that consent information has been obtained. Therefore, the plugin will return a status of "OBTAINED" even when the user selects "Do Not Consent" on the consent form.
The UMP SDK handles propagation of the user's actual consent choice to the Google Mobile Ads SDK automatically. Ad requests made after consent is obtained will respect the user's selection (e.g., non-personalized ads if they did not consent).
User Consent Methods
get_consent_status()- Returns a consent status value defined inConsentInformation.gdupdate_consent_info(params: ConsentRequestParameters)- To be called ifget_consent_status()returns status UNKNOWN.reset_consent_info()- To be used only when testing and debugging your application.is_consent_form_available()load_consent_form()- To be called ifget_consent_status()returns status REQUIRED andis_consent_form_available()returnsfalse.show_consent_form()- To be called afterconsent_form_loadedsignal has been emitted oris_consent_form_available()returnstrue.
Testing User Consent Logic
In order to test user consent logic for your app, you need to add your test device's hashed identifier to the test_device_hashed_ids array of your Admob node (or set it programmatically). If you don't know your test device hashed identifier, then run your app with is_real set to false and look for a log entry such as the following that is logged on iOS.