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 / ShowFullscreenAdvertAdMob() dosent work

Author
Message
haliop_New
User Banned
Posted: 10th Oct 2016 17:11
this command is new to me since the last time I used ads was AppGameKit 1.0 versions...
I have set SetAdMobDetails at start with the given string by admob site , set a new app-ad inside admob to get that string
I also use GetFullscreenAdvertLoadedAdMob() but it always returns a 0 integer...

maybe there is something I'm doing wrong
can someone show a working code for this ?
i'll add the string I got on admob for testing
using android LG g3
and have exported maybe something in the export is missing I don't know
it was a long time since Ive done this, so any help will be thankful

thank you for your time, haliop.
pinete
12
Years of Service
User Offline
Joined: 28th Jul 2011
Location:
Posted: 10th Oct 2016 17:27
Hi haliop,
precisely yesterday I was making some attempts to see how it works, with v2.0.21.
Apparently it works over here, just with this code:



As you see I'm asking for a test ad (the last parameter), as AGK2 instructions say, 0 for a test non-paying adv, 1 for a paying adv.

I don't know for sure but maybe the problem is that admob cannot send you an adv? as far as I know sometimes there are not enough adv to send ...
There are a lot of users over here that can help you far better than me.
Best!




haliop_New
User Banned
Posted: 10th Oct 2016 18:26
can you post a full working code ? like with the loop and everything cause I cant seem to get this to work and I don't think its because there aren't any adverts
I think its just that I'm doing it wrong ...

pinete
12
Years of Service
User Offline
Joined: 28th Jul 2011
Location:
Posted: 10th Oct 2016 19:09 Edited at: 10th Oct 2016 19:11
This is the code that yesterday was working for me..


SetAdMobDetails("your admob code")
CreateAdvert(0, 0, 0, 0)
ShowFullscreenAdvertAdMob()
do
sync()
loop


Apparently is not very complicated, let me know, halio.
haliop_New
User Banned
Posted: 11th Oct 2016 07:42
yep this dosent work on my end...
pinete
12
Years of Service
User Offline
Joined: 28th Jul 2011
Location:
Posted: 11th Oct 2016 08:48
Hi Haliop,
I'm strongly guessing that the issue comes from the fact that admob is not always ready to send an intersticial advert.

As a first clue, you can check it here
https://www.appgamekit.com/documentation/Reference/Advert/GetFullscreenAdvertLoadedAdMob.htm

and more important than that, take a look at the admob website to the 'intersticial advertisement guide'.

I cannot copy the link as it is read on a kind of popup, but again, they said (the people at admob) that they don't use to send intersticials until your app has a good traffic... and depending on other facts as well.
That's what I understood.

So the code I pasted would be enough to have it working, maybe you can change the last parameter of createadvert by a '1', asking for a test adv., but anyway, it should be enough.
If it doesn't work, my guess is that the problem is not made by you but by the nature of the advertisement system at admob.
Best!


Funnell7
12
Years of Service
User Offline
Joined: 8th Sep 2011
Location: UK, England
Posted: 11th Oct 2016 09:06
CreateAdvert() is for Banner Ads, and ShowFullscreenAdvertAdMob() is for interstitial Ads. You don't need to call both (unless of course you want both? Not sure if that is possible though, never tried)...

Simply calling SetAdMobDetails() prior to your do/loop, and then calling ShowFullscreenAdvertAdMob() when you want to display the ad should be sufficient.

You can call GetFullscreenAdvertLoadedAdMob() to see if an ad has been preloaded, however, if one hasn't, you will still want to call ShowFullscreenAdvertAdMob() as this will restart the ad loading process to see if any are available.

Note, there was a security vulnerability in AdMob which was addressed in version 2.0.19 (I think, might of been 2.0.20), so anything before this may no longer display ads.

Using AppGameKit V2 Tier 1
pinete
12
Years of Service
User Offline
Joined: 28th Jul 2011
Location:
Posted: 11th Oct 2016 10:42
Thanks a lot Funnell7!
CJB
Valued Member
20
Years of Service
User Offline
Joined: 10th Feb 2004
Location: Essex, UK
Posted: 11th Oct 2016 13:39
Try testing via installing the APK rather than broadcast.
V2 T1 (Mostly)
Phone Tap!
Uzmadesign
haliop_New
User Banned
Posted: 11th Oct 2016 14:26 Edited at: 11th Oct 2016 14:27
CJB I have broadcast dosent work for me because I think my router so I export it always
I have also tried charboost ,I ve opened a new account and it also dosent work
my code looks something like this (cant share everything right ?)


CJB
Valued Member
20
Years of Service
User Offline
Joined: 10th Feb 2004
Location: Essex, UK
Posted: 11th Oct 2016 14:53
Here you go:



I used Admob for banners and Chartboost for interstitials.

Replace the xx's with your admob/chartboost ids. Be sure to place a call to LIBInitAds() at the top of your code (before your game loop) , and then just call LIBdisplayAdvertBanner() or LIBdisplayAdvertFullscreen() only when you want an add to appear, not at every frame!

Wilf showed me the way. (Thanks Wilf!)

V2 T1 (Mostly)
Phone Tap!
Uzmadesign
haliop_New
User Banned
Posted: 11th Oct 2016 16:10
thank you
it works now.
pinete
12
Years of Service
User Offline
Joined: 28th Jul 2011
Location:
Posted: 11th Oct 2016 19:20
Haliop, you mean it worked with CJB solution?
could you please let us know?
Best!
haliop_New
User Banned
Posted: 16th Oct 2016 15:46
yeah the last solution is the one that worked for some time , then I tried it again and there were no ads
but maybe if i'll try again there would be more ads I don't know...
Wilf
Valued Member
17
Years of Service
User Offline
Joined: 1st Jun 2006
Location: Gone to Unity.
Posted: 17th Oct 2016 10:56
You're welcome CJB! I found it helpful to drop this into a debug function called during the main loop:


It's interesting to see how long it takes for the numbers to change to 1, and that sometimes certain providers just don't seem to be able to supply an ad.
CJB
Valued Member
20
Years of Service
User Offline
Joined: 10th Feb 2004
Location: Essex, UK
Posted: 3rd Jan 2017 07:58 Edited at: 3rd Jan 2017 13:47
My latest little mini game "Aaargh! Ducks!" calls for a full screen interstitial on a 12.5% probability on the game-over screen, but it has so far NEVER displayed a full-screen ad. GetFullScreenAdvertLaodedMob always returns zero. I suspect they're not serving full screen ads until traffic has built up for the app. Either that, or the full-screen admob commands are broken.
V2 T1 (Mostly)
Phone Tap!
Uzmadesign
xCept
21
Years of Service
User Offline
Joined: 15th Dec 2002
Location:
Posted: 3rd Jan 2017 08:10
I haven't done anything with interstitials in quite awhile with AGK. But when I did, I implemented a system that used all three networks (Admob, Amazon and Chartboost) with a check system that would use one of the three depending on which was available to improve the fill rate.
PSY
Developer
7
Years of Service
User Offline
Joined: 3rd Jul 2016
Location: Laniakea Supercluster
Posted: 3rd Jan 2017 14:18 Edited at: 2nd Feb 2017 18:53
Hey,

I use fullscreen admob and charboost ads on the game-over screen, both work fine.
I usually give them some time to load. When both are loaded, chartboost is displayed with a probability of 75%.
The ad details in the code are the test details used in the examples that come with AGK.

As soon as the game starts, I preload the ads with:



@ GAME OVER, I call this function to show them:
PSY LABS Games
Coders don't die, they just gosub without return

Login to post a reply

Server time is: 2024-04-20 10:49:23
Your offset time is: 2024-04-20 10:49:23