@FrogLogics First, thanks for sharing this module!!
But man, I'm probably doing something wrong and I can't initialize the AdMob. I really dont know what could be. =(
This the code used tu call the AdMob:
var firebase = null
func ready():
if OS.get_name() == "Android":
if Globals.has_singleton("FireBase"):
print("## has singleton FireBase")
firebase = Globals.get_singleton("FireBase")
firebase.initWithFile("res://godot-firebase-config.json", get_instance_ID());
(...)
func _on_ad_pressed():
if firebase != null:
firebase.show_interstitial_ad()
#firebase.show_banner_ad(true)
else:
print("firebase == null")
func receive_message(from, key, data):
if from == "FireBase":
if key == "AdMobReward":
print("json data with [RewardType & RewardAmount]: ", data);
elif key == "AdMob_Video":
print("AdMob rewarded video status is ", data);
elif key == "AdMob_Banner":
print("Banner Status: ", data);
elif key == "AdMob_Interstitial" and data == "loaded":
print("Interstitial Status: ", data);
####
The godot-firebase-config.json:
_{
"AdMob" : true,
"Authentication" : true,
"Invites" : false,
"RemoteConfig" : false,
"Notification" : true,
"Storage" : true,
"Auth" :
{
"Google" : false,
"Facebook" : false,
"FacebookAppId" : ""
},
"Ads" :
{
"BannerAd" : false,
"BannerGravity" : "BOTTOM",
"BannerAdId" : "ca-app-pub-3940256099942544/6300978111",
**"InterstitialAd" : true,
"InterstitialAdId" : "ca-app-pub-3940256099942544/1033173712",**
"RewardedVideoAd" : false,
"RewardedVideoAdId" : "ca-app-pub-3940256099942544/5224354917"
}
}_
The is the log and what happens when I try to call the Ad:
(...)
I/godot (11778): ## has singleton FireBase
D/FireBase(11778): Data From File:
D/FireBase(11778): Firebase Analytics initialized..!
D/FireBase(11778): FireBase initialized.
D/FireBase(11778): Refreshed token: (...)
D/FireBase(11778): Token: (...)
D/FireBase(11778): AdMob:NotInitialized.
D/FireBase(11778): AdMob:NotInitialized.
D/FireBase(11778): AdMob:NotInitialized.
D/FireBase(11778): AdMob:NotInitialized.