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 / AdMob Help (Not difficult)

Author
Message
Sh4d0xx
9
Years of Service
User Offline
Joined: 5th Dec 2014
Location: United Kingdom
Posted: 23rd Mar 2016 13:15
Hello AGKers,

I have developed an app using AppGameKit 2, and added Admob Interstitial which seem to be working fine.

However there is a little problem I have:

The Interstitial keep repeatedly popping up, making it impossible to use the Application.

Basically, if I close the interstitial, it pops up again almost immediately.

I figured it has something to do with the refresh rate.

Here's the code:



Does anyone know how to control the refresh rate of the pop up ads ?

Your help will be much appreciated.

Many Thanks
isgltd (2014)
Funnell7
13
Years of Service
User Offline
Joined: 8th Sep 2011
Location: UK, England
Posted: 23rd Mar 2016 15:02
You are going to want to put ShowFullscreenAdvertAdMob() on some kind of timer, or event. You do not want to be looping though it (every time you call it, it will fetch a new ad). For example, in one of my apps (a platform game), I display an add every 3rd life. The code would be something like this;

Using AppGameKit V2 Tier 1
Sh4d0xx
9
Years of Service
User Offline
Joined: 5th Dec 2014
Location: United Kingdom
Posted: 23rd Mar 2016 15:07
Hello and thanks so much for your reply.

I suspected a function was required to control it!

My app is not one that is a game.

It's a simple photo comparison app.

So I think the 2nd function is more applicable.


Is DisplayAdCount a function already in AppGameKit library ?

Many Thanks
isgltd (2014)
Sh4d0xx
9
Years of Service
User Offline
Joined: 5th Dec 2014
Location: United Kingdom
Posted: 23rd Mar 2016 15:14
Ahhhhhhhhhhhhhhh

I think I might have a rather devious idea

I will test the idea now and tell you if it works
isgltd (2014)
Sh4d0xx
9
Years of Service
User Offline
Joined: 5th Dec 2014
Location: United Kingdom
Posted: 23rd Mar 2016 21:47


Sadly my idea did not work.

It's still doing the same thing.
isgltd (2014)
xCept
21
Years of Service
User Offline
Joined: 15th Dec 2002
Location:
Posted: 24th Mar 2016 01:53
As Funnell mentioned, you should not be calling ShowFullscreenAdvertAdMob() in a loop. In apps like yours it makes most sense to call it after every so many pictures are shown/solved. Using Funnell's example, you could create a global variable called DisplayAdCount and add one to it for each picture that is shown. Check when it has reached 'x' number of times and then call the ad command while also resetting its value to 0 so the ad will not reappear.

Login to post a reply

Server time is: 2024-09-29 13:25:47
Your offset time is: 2024-09-29 13:25:47