Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

AppGameKit Classic Chat / GetFullscreenAdvertLoaded[AdMob|Amazon|Chartboost]

Author
Message
Kevin Cross
20
Years of Service
User Offline
Joined: 15th Nov 2003
Location: London, UK
Posted: 14th Jan 2017 14:56 Edited at: 14th Jan 2017 15:03
Hi

If you put a call for the GetFullScreenAdvertLoaded function i.e. GetFullScreenAdvertLoadedAmazon into the main do loop, would it continuously check if one is available and set as 1 when one is available or will it always be 0 if one didn't preload before the do loop? I want to do something like this:

do
If ([time since last ad shown was 3 minutes] and GetFullScreenAdvertLoadedAmazon())
ShowFullscreenAdvertAmazon()
[reset timer]
endif
Sync()
loop

I don't want to keep calling ShowFullscreenAdvertAmazon to test for when it's available like the documentation says try.

If GetFullScreenAdvertLoadedAmazon attempts to preload a new advert each time and changes to 1 when it's available then I can do the above and that'll be fine.

At some point this morning since adding Amazon ads to my app the ads have stopped showing completely.

I tried the Adverts example that comes with AGK2 but all of the get values are showing as 0 for the 3 ad providers. I tried leaving the example running for about 5 minutes to see if any of the get values changed to 1 but they didn't.

If GetFullScreenAdvertLoaded* doesn't check for new ads and preload them each time it's called then why isn't there a function to do that before you attempt to show them?

I should add that the only provider I seem to be having trouble with is Amazon. Chartboost works fine. Same with the example project too it's not calling an Amazon ad, nor is one showing when the Amazon button is pressed. Is this likely to work if I added it for when Amazon ads are available?

do
If ([time since last ad shown was 3 minutes] and GetFullScreenAdvertLoadedAmazon())
ShowFullscreenAdvertAmazon()
[reset timer]
endif
Sync()
loop

Thanks

Kevin
Kevin Cross
20
Years of Service
User Offline
Joined: 15th Nov 2003
Location: London, UK
Posted: 15th Jan 2017 09:38
I think I've managed to come up with a way to use ShowFullscreenAdvert[AdMob|Amazon|Chartboost] continuously and not call it again for a set amount of time once it finally loads an ad



This works because when an ad is finally shown the GetSeconds() value automatically drops back to zero. So if I check for the GetSeconds() value to be less than 140 seconds I know that the ad has just been shown. If it hasn't dropped less than 140 then the ad hasn't been shown so I continuously check for a new ad and switch between AdMob, Amazon, and Chartboost every two seconds.

Unfortunately at the moment neither Amazon or AdMob have full screen ads available so it's often just showing Chartboost. I'm going to remove Chartboost from this code because I really only want to show Amazon or AdMob. I only added Chartboost to test that it works.

Login to post a reply

Server time is: 2024-04-24 12:09:15
Your offset time is: 2024-04-24 12:09:15