0 votes

Im having problems with this for long time.
Im using godot admob master because one guy recommended it to me.
when I click watch button on my pc or phone it doesnt do anything.

var admob = null
var isReal = false
var isTop = true
var adBannerId = "ca-app-pub-3263458850279674/8492940341"
var adInterstitialId = "ca-app-pub-3263458850279674/8492940341"

func _ready():
        admob = Globals.get_singleton("AdMob")
        admob.init(isReal, get_instance_ID())

get_tree().connect("screen_resized", self, "onResize")

func loadBanner():
    if admob != null:
        admob.loadBanner(adBannerId, isTop)

func loadInterstitial():
    if admob != null:

func _on_watch_pressed():

(sorry for the form, doesnt want to work as well)

in Engine by (330 points)
edited by

1 Answer

+3 votes
Best answer

There could be couple of problems in getting this to work:
1. check to see if you actually have the AdMob module loaded ( try a print in the first if statement from ready function).
If it's not loaded make sure you load the module, you can load the module from the project settings or you can directly edit your engine.cfg file, like this:

I don't exactly know how your module is called since mine is a custom build.
Presumably this should solve the problem, if it doesn't, the module still doesn't load, then maybe you should find out how is the module called, or maybe the build you have does not have the admob module in it. Did you re-compiled the engine with the module in it yourself ?

If you module is loading, the problem could come from Google. You should not be using the IDs given by Google for testing purposes because Google has strict policies on this and could ban you without notice.
Instead you should be using a "test" ID, that will ensure that you always receive and testing ad, otherwise it could be that now ad is available for your location at the time of testing.
This is the test ID for banners:
it should at least show you a test banner.
hope this helps....

by (530 points)
selected by

Thanks, I will try this.

I'm getting to run the test ads, but the real ones do not, because they have to put the APP ID, but I do not know how to add this ID, you know how to do it ??

Welcome to Godot Engine Q&A, where you can ask questions and receive answers from other members of the community.

Please make sure to read Frequently asked questions and How to use this Q&A? before posting your first questions.
Social login is currently unavailable. If you've previously logged in with a Facebook or GitHub account, use the I forgot my password link in the login box to set a password for your account. If you still can't access your account, send an email to [email protected] with your username.