In Android UMP "canRequestAds()" doesn't return false when user select "Do not consent" in Testing phase?

247 Views Asked by At

Platform: Android

Feature: Add User Messaging Platform (UMP: https://developers.google.com/admob/android/privacy )

I have implement same code as given by Google in this above document. if we have to test the Consent Form how looks like we can call show methods with debug configuration same as example code

Now, Consent form is successfully show in Test device. But when I m click on "Do not Consent" button and then get callback in "onConsentFormDismissed()" method. in this method simpliy call "canRequestAds()" function as to know ads request or not. But it's getting everytime "TRUE".

Code ref: https://github.com/googleads/googleads-mobile-android-examples/blob/main/java/admob/BannerExample/app/src/main/java/com/google/android/gms/example/bannerexample/GoogleMobileAdsConsentManager.java

I m used this same Singleton class and implement. In this demo project it is wokring like return false but in my demo it is not return flase.

Note: I am used all Test ads ids

1

There are 1 best solutions below

0
On

According to the documentation of mobile Ads Sdk the method CanRequestAds always returns true if the user has completed the consent form step.

In my experience, this method only returns false when the consent form has not been shown to the user. In my app, this form is the first view visible after the splash view, so the user must interact with the consent form and click some options. Then I initialize MobileAdSdk if CanRequestAds == true. No matter if the user does not consent permissions, the vendors are responsible for operating with the TCs stored by the CMP