Christopher Alexander
Member
I'm having trouble showing or loading interstitial ads for an android game.
I've got an object (obj_ad_controller) set as persistent and it gets created very early in the game. Splash screen early.
This is in its create event:
And this is in the async social event:
I also tried this in the async social:
Later on when the player has cleared a level I send them to a room with some fireworks and a congratulatory message, upon screen touch I try to load an ad, for testing porpuses nothing else happens,t looks like this (in Left Released event):
But nothing happens at all. And on debugging I get interstitial_loaded as "0" so false. It never loads, what am I doing wrong?
What am I doing wrong? I mainly followed this guide: https://help.yoyogames.com/hc/en-us/articles/360002971751-iOS-and-Android-Google-Mobile-Ads-Setup
Oh yeah, stuff in "[]" are omitted here but they hold the right IDs and I got the first two off my AdMob console thingy.
EDIT:
I've now tried to add banner ads but get a 400 error, what is that? Also, it says that interstitial ad was not ready to be shown. How long should that take to load??
I've got an object (obj_ad_controller) set as persistent and it gets created very early in the game. Splash screen early.
This is in its create event:
Code:
if os_type == os_ios
{
/*
app_id = "";
banner_id = "";
interstitial_id = "";
rewarded_id = "";
*/
}
else
{
app_id = [my_app_id];
//banner_id = "";
interstitial_id = [my_ad_id];
//rewarded_id = "";
}
GoogleMobileAds_Init(interstitial_id, app_id);
GoogleMobileAds_LoadInterstitial();
interstitial_loaded = false;
GoogleMobileAds_UseTestAds(true, [my_test_id]);
Code:
var loaded = ds_map_find_value(async_load, "loaded");
if (loaded)
{
interstitial_loaded = true;
}
Code:
var _id = async_load[? "id"];
if (_id == GoogleMobileAds_ASyncEvent)
{
var ident = async_load[? "type"];
switch (ident)
{
case "interstitial_load":
if (async_load[? "loaded"] == 1)
{
interstitial_loaded = true;
}
break;
}
}
Code:
if (obj_ad_controller.interstitial_loaded == true)
{
obj_ad_controller.interstitial_loaded = false;
GoogleMobileAds_ShowInterstitial();
}
What am I doing wrong? I mainly followed this guide: https://help.yoyogames.com/hc/en-us/articles/360002971751-iOS-and-Android-Google-Mobile-Ads-Setup
Oh yeah, stuff in "[]" are omitted here but they hold the right IDs and I got the first two off my AdMob console thingy.
EDIT:
I've now tried to add banner ads but get a 400 error, what is that? Also, it says that interstitial ad was not ready to be shown. How long should that take to load??
Last edited: