• Hello [name]! Thanks for joining the GMC. Before making any posts in the Tech Support forum, can we suggest you read the forum rules? These are simple guidelines that we ask you to follow so that you can get the best help possible for your issue.

Android Google Consent form not working

N

Narayan Lewandowski

Guest
Hi all. Im finishing up my game. Using the Google play services I've already set up interstial and rewards ads succesfully and now I'm trying to get the consent form to show up. I think I'm following the included pdf manual correctly. Though nothing happens when I run it on my phone and it shows this in the output window:
Code:
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()
    at android.os.Handler.<init>(Handler.java:203)
    at android.os.Handler.<init>(Handler.java:117)
    at android.app.Dialog.<init>(Dialog.java:142)
    at android.app.Dialog.<init>(Dialog.java:175)
    at com.google.ads.consent.ConsentForm.<init>(ConsentForm.java:76)
    at com.google.ads.consent.ConsentForm.<init>(ConsentForm.java:45)
    at com.google.ads.consent.ConsentForm$Builder.build(ConsentForm.java:208)
    at com.company.game.GooglePlayAdsExtension.GoogleMobileAds_ConsentFormShow(GooglePlayAdsExtension.java:802)
    at java.lang.reflect.Method.invoke(Native Method)
    at com.yoyogames.runner.RunnerJNILib.CallExtensionFunction(RunnerJNILib.java:1187)
    at com.yoyogames.runner.RunnerJNILib.Startup(Native Method)
    at com.company.game.DemoRenderer.onDrawFrame(DemoRenderer.java:540)
    at android.opengl.GLSurfaceView$GLThread.guardedRun(GLSurfaceView.java:1571)
    at android.opengl.GLSurfaceView$GLThread.run(GLSurfaceView.java:1270)
Found method public void com.company.game.RunnerSocial.Event(java.lang.String)
Found method public void com.company.game.RunnerSocial.GetInfo(java.lang.String)
Found method public void com.company.game.GooglePlayAdsExtension.GoogleMobileAds_AddBanner(java.lang.String,double)
Found method public void com.company.game.GooglePlayAdsExtension.GoogleMobileAds_AddBannerAt(java.lang.String,double,double,double)
Followed with a bunch more 'found mothod public void...' which don't show up if I dont try to show the form.

I even just made a separate gm file with this code in the create event of an object to see if its caused by anything else but the same happens.. no form shows up :(
Code:
ads_app_id = "ca-app-pub-*************~";
ads_device_id = "***********";
ads_privacy_url = "***";
GoogleMobileAds_Init("ca-app-pub-**************/", ads_app_id);
GoogleMobileAds_ConsentDebugAddDevice(ads_device_id);
GoogleMobileAds_ConsentDebugSetDeviceInEEA(true);
GoogleMobileAds_ConsentFormShow(ads_privacy_url, true, true, false);
Is this a bug or am i doing it wrong?? Please help..
 
Last edited by a moderator:

Fiersking

Member
hi! for me it says :
Unable to find method to invoke matching methodname:GoogleMobileAds_ConsentFormShow on class:GooglePlayAdsExtension with params:.

i realy did what they say on the tutorial ...

anyone know ?
 
Top