Nicolas
Nicolas

Reputation: 99

Run vungle advertisments after some time

I'm having some problems to figure out how to run my add after a specific amount of time, let's say 5 minutes.

I have a basic app and the only possibility to add vunglePub.playAd(); would be after I handle the new answer of my app. Is there any possibility you could add in a timer set to 5 minutes each time and run vunglePub.playAd(); and then repeat it again?

Thanks in advance

Upvotes: 0

Views: 440

Answers (1)

VungleDavid
VungleDavid

Reputation: 26

Delighted to hear that you're using Vungle!

There are a couple of ways that you could achieve this:

1) Use any number of patterns in Java to keep a timer, and only call VunglePub.playAd() after certain amounts of time.

2) Use Vungle's built-in feature designed for this exact use-case! If you go to your app on the Vungle dashboard, click 'edit' and then hit 'advanced settings'. One of the options in there is the 'frequency' cap, which allows you set a minimum time, in seconds, between ad plays. If you set it to 300 seconds, then once you've called VunglePub.playAd() once, we'll ignore and attempts to playAd() until 300 seconds is up.

Option 1 may be more useful in some instances, especially if you want to action any other behaviour at the same time, but option 2 is probably the simplest to implement!

And if you run into any issues - hit us up at 'tech hyphen support at vungle dot com'.

David@Vungle.

Upvotes: 1

Related Questions