Controlling the when and where of Applovin

Hi,

I’m using Applovin to display ads in my app. 

I want to specify which screens to show ads on, and which not to. For example, I want to show ads on the level select screen, then I dont want to show ads during a race, but I want to when the level end screen comes. How can I do that?

Also, is there a way to specify duration between ads? like, once a video ad is shown I dont want it to show again before at least 60 seconds.

I couldnt find anything in the documentation. If this isnt possible with applovin, please suggest a different one.

Thanks a lot.

None of our ad providers are going to have that kind of logic. When to show and hide ads is totally up to you.

If you’re using scene management like Composer, then you have a natural opportunity to call the .show() function in the scene’s scene:show()'s “did” phase. Likewise you can hide the ad in scene:hide()'s “will” phase.

If you show a video ad and want a delay before you do it again, set a variable with the current time in seconds (local lastAdShown = os.time()). When it’s logical to show your ad again but you want to make sure enough time has elapsed, you can then do:

local now = os.time() if now \> lastAdShown + 60 then       lastAdShown = os.time()       yourAdProvider.show( yourAdParameters ) end

or something like that.

Rob

None of our ad providers are going to have that kind of logic. When to show and hide ads is totally up to you.

If you’re using scene management like Composer, then you have a natural opportunity to call the .show() function in the scene’s scene:show()'s “did” phase. Likewise you can hide the ad in scene:hide()'s “will” phase.

If you show a video ad and want a delay before you do it again, set a variable with the current time in seconds (local lastAdShown = os.time()). When it’s logical to show your ad again but you want to make sure enough time has elapsed, you can then do:

local now = os.time() if now \> lastAdShown + 60 then       lastAdShown = os.time()       yourAdProvider.show( yourAdParameters ) end

or something like that.

Rob