• 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!
  • 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 [SOLVED]Questions about Google ad Mob display

H

hykwf233

Guest
I can show ads when I use Google adMob test ID, but I can't load ads when I use my own ID. Google adMob can see the number of requests in the background. Does anyone know what is going on?
 

chirpy

Member
It really depends on what error message you received. Have you made sure your publisher ID / ad unit ID are correctly changed to your own IDs?
 
H

hykwf233

Guest
It really depends on what error message you received. Have you made sure your publisher ID / ad unit ID are correctly changed to your own IDs?
Yes, I am sure all have been changed to my own ID is. I see some people saying that they can be displayed after adding payment information. However, you can only add payment methods in GOOGLE AD MOB after reaching a certain amount. I'm not sure if the payment information is the payment method.
 

chirpy

Member
By "Google adMob test ID" do you mean sample ad unit IDs provided by Google? (e.g. "ca-app-pub-3940256099942544/1033173712" for interstitial)
If so you should probably try test ads as the next step.

I don't really remember about the payment info process, but I believe you should be able to get test ads in android AVD emulator without filling out payment info.
Emulator ads will automatically be test ads if I remembered correctly.

Otherwise if you're using a physical device, you'll have to call -> GoogleMobileAds_UseTestAds with the device ID dumped by AdMob SDK, which should be available in your console log (or adb logcat) somewhere when initializing.

References:
https://help.yoyogames.com/hc/en-us/articles/360002971751-iOS-and-Android-Google-Mobile-Ads-Setup
https://developers.google.com/admob/android/test-ads#enable_test_devices

For real ads, it is possible to simply get "no fill", especially if your app is not yet published, or when you just freshly created the ad units.
Still, you'll need to print the error code or error message to be sure.
What ad format are you trying to use by the way?
 
H

hykwf233

Guest
This is all my code. When using the test ID, banner ads can be displayed, but when using my own ID, the following error occurs.

Code:
12-19 09:05:57.380 29127 29127 I yoyo    : onWindowFocusChanged(true|false)
12-19 09:05:57.380 29127 29127 I yoyo    : Setting vis flags to 5894
12-19 09:05:57.880 29127 29127 I yoyo    : Setting vis flags to 5894
12-19 09:06:00.467 29127 29127 I Ads     : Use AdRequest.Builder.addTestDevice("8D76D4B766CE1E636A091377D6065F95") to get test ads on this device.
12-19 09:06:00.583 23944 29397 I Ads     : SDK version: afma-sdk-a-v18479999.15000000.1
12-19 09:06:00.792 29127 29127 I yoyo    : Banner Ad onAdFailedToLoad
12-19 09:06:00.793 29127 29127 I Ads     : Ad failed to load : 3
 
Last edited by a moderator:

chirpy

Member
Error code 3 is indeed "no fill", meaning temporarily no ad for your app to display (for any reason; maybe the app is new and does not have enough users, or ads may not be available in the viewer's region).

You could try using "8D76D4B766CE1E636A091377D6065F95" as your test device ID, as suggested in the log, which is different from the device ID you used.
Code:
12-19 09:06:00.467 29127 29127 I Ads     : Use AdRequest.Builder.addTestDevice("8D76D4B766CE1E636A091377D6065F95") to get test ads on this device.
In GMS this is equivalent as the following in your game start event:
Code:
GoogleMobileAds_UseTestAds(true, "8D76D4B766CE1E636A091377D6065F95"); // this has to be called before _AddBanner or _LoadInterstitial
Since you're able to show sample ad units, your implementation probably is just alright. Test ads only allow us to make sure we get admob backend ad unit settings right as well.

Also I've heard that you shouldn't post your publisher / ad unit IDs in public, so you'd probably need to mask it as /xxxxx. Sorry I didn't mention this earlier.
 
Last edited:
H

hykwf233

Guest
Thank you very much for reminding me that I have deleted all advertising IDs.
 
H

hykwf233

Guest
Error code 3 is indeed "no fill", meaning temporarily no ad for your app to display (for any reason; maybe the app is new and does not have enough users, or ads may not be available in the viewer's region).

You could try using "8D76D4B766CE1E636A091377D6065F95" as your test device ID, as suggested in the log, which is different from the device ID you used.
Code:
12-19 09:06:00.467 29127 29127 I Ads     : Use AdRequest.Builder.addTestDevice("8D76D4B766CE1E636A091377D6065F95") to get test ads on this device.
In GMS this is equivalent as the following in your game start event:
Code:
GoogleMobileAds_UseTestAds(true, "8D76D4B766CE1E636A091377D6065F95"); // this has to be called before _AddBanner or _LoadInterstitial
Since you're able to show sample ad units, your implementation probably is just alright. Test ads only allow us to make sure we get admob backend ad unit settings right as well.

Also I've heard that you shouldn't post your publisher / ad unit IDs in public, so you'd probably need to mask it as /xxxxx. Sorry I didn't mention this earlier.
Thank you for your answer, you are right. After changing "8D76D4B766CE1E636A091377D6065F95", I can display my own advertising ID. Now at least I can make sure that my banner ads are displayed properly.
But when I tried to motivate ads, something went wrong. If I place the switch that triggers rewarded ads in the first room, I can display the ads (but I ca n’t get rewards); when I put them in another room, it wo n’t load and the game will crash.
 
H

hykwf233

Guest
Error code 3 is indeed "no fill", meaning temporarily no ad for your app to display (for any reason; maybe the app is new and does not have enough users, or ads may not be available in the viewer's region).

FATAL ERROR in
action number 1
of Step Event0
for object o_video:

Unable to find any instance for object index '0' name 'o_control'
at gml_Object_o_video_Step_0 (line 2) - if(o_control.rewarded_loaded){
############################################################################################
--------------------------------------------------------------------------------------------
stack frame is
gml_Object_o_video_Step_0 (line 2)

The above error occurs when I place the trigger step event of the rewarded ad in another room.
 
H

hykwf233

Guest
When I put the content of the asynchronous social event on the same object that triggered the incentive ad, it seems to solve the above problem, so I really appreciate your help all the time, thank you ~
 
Top