How to properly setup admob?

:information_source: Attention Topic was automatically imported from the old Question2Answer platform.
:bust_in_silhouette: Asked By Sprowk
:warning: Old Version Published before Godot 3 was released.

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)

:bust_in_silhouette: Reply From: MrMonk

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…

Thanks, I will try this.

Sprowk | 2016-11-08 10:32

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

Thiago mendes | 2018-12-01 21:36