How to correctly use Chartboost?

Hey Guys!

I’m using chartboost to show interstitials in my android game! I want to show them when you start the game or if the game is over
on the title screen. The problem is sometimes the ads also pop up during the game which is a big pain in the a**.

The implementation looks like this:

	void Start () {
		CBBinding.init ();
		CBBinding.forceOrientation(ScreenOrientation.Portrait);
		CBBinding.showInterstitial(null);
		CBBinding.cacheInterstitial(null);
	}

There is actually a method CBBinding.hasCachedInterstitial() that allows to check if the ad is cached, but I figure that if I use that, I will not be able to show the interstitial at the start of the game?

Has anyone of you guys found a solution for this??

thanks,
Sebastian

Hey Sebastian–David from Chartboost, here.

While that may work most of the time, it’s not best practice to call showInterstitial and cacheInterstitial immediately after each other. The showInterstitial animation takes about 250 milliseconds, and if the cacheInterstitial request returns before that animation is complete — some of the interstitial assets may be erased.

On bootup, it’s best to simply just call showInterstitial to fix your issue as well as this edge case.

If you have any further questions feel free to email our specialists support@chartboost.com