Method RequestUmpConsentAsync
RequestUmpConsentAsync()
Runs the Google UMP consent flow: refreshes the stored consent state, then shows the consent form
if the user's region requires one. Returns whether ads may now be requested
(CanRequestAds).
Await this before AdMobModule.InitializeAsync — Google's EU user consent policy
requires the user to have answered before the first ad request. Awaiting it early, while a loading
screen is still up, also keeps the form from appearing on top of gameplay.
Safe to await more than once: the flow runs once per launch (as UMP requires) and later callers get
that same result. Returns true immediately in builds without UMP, so callers need no guard.
public static Awaitable<bool> RequestUmpConsentAsync()
Returns
- Awaitable<bool>
Remarks
The form only appears once a GDPR message has been published for the app under AdMob → Privacy & messaging; without one there is nothing to show and this resolves straight away. To exercise the form from outside the EEA, see EnableConsentDebugging(ConsentDebugGeography, List<TestDevice>).