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.
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.