• Hey Guest! Ever feel like entering a Game Jam, but the time limit is always too much pressure? We get it... You lead a hectic life and dedicating 3 whole days to make a game just doesn't work for you! So, why not enter the GMC SLOW JAM? Take your time! Kick back and make your game over 4 months! Interested? Then just click here!

Android Admob Consent Issue

DireMind

Member
I would like to give users the chance to change their consent status but I can’t seem to get the Admob consent form to show after the first time. Here is what I’m doing.

ap_id = “123456”;
ads_consent_id = “123456”;
ads_device_id = “123456”;
ads_privacy_url = “privacy plicy here”;
GoogleMobileAds_Init("", ap_id);
GoogleMobileAds_ConsentDebugAddDevice(ads_device_id);
GoogleMobileAds_ConsentDebugSetDeviceInEEA(true);
GoogleMobileAds_ConsentUpdate(ads_consent_id, ads_privacy_url, true, true, true);

This shows the consent dialog once. If the user would like to change their consent status I use this to show the consent form again:

GoogleMobileAds_ConsentFormShow(ads_privacy_url, true, true, true);

This shows nothing and outputs this:

: Attempting to show consent form.
: InvocationTargetException thrown trying to call method GoogleMobileAds_ConsentFormShow on GooglePlayAdsExtension
: Target exception: Can't create handler inside thread that has not called Looper.prepare(). Cause: null. Stack trace:
: java.lang.RuntimeException: Can't create handler inside thread that has not called Looper.prepare()

Any help would be much appreciated. Thanks.
 
Top