I followed a guide on Google's Documentation, to display a GDPR consent message and I can't get it to show, I used the code from the documentation, but edited the code from the Privacy options section where I added the last argument like this:
consentInformation = UserMessagingPlatform.getConsentInformation(this);
consentInformation.requestConsentInfoUpdate(
this,
params,
(ConsentInformation.OnConsentInfoUpdateSuccessListener) () -> {
UserMessagingPlatform.loadAndShowConsentFormIfRequired(
this,
(ConsentForm.OnConsentFormDismissedListener) loadAndShowError -> {
// ...
// Consent has been gathered.
if (isPrivacyOptionsRequired()) {
// Regenerate the options menu to include a privacy setting.
ConsentVisibility = true;
}
else ConsentVisibility = false;
}
);
}
, (ConsentInformation.OnConsentInfoUpdateFailureListener) requestConsentError -> {
// Consent gathering failed.
Log.d("ConsentF", String.format("%s: %s",
requestConsentError.getErrorCode(),
requestConsentError.getMessage()));
});
The things I've tried:
The consent doesn't show up no matter what I do.¸
Edit: Consent form was also added in Google's Console.
For some odd reason my Consent Message got deleated, after readding it in the AdMob's Console, it didn't work with the debug settings, but it did with normal ones. So it works now.