Follow

Showing Interstitial Ads

View original article on our GitHub

ou can choose to show the interstitial ad in several locations within your application. This could be upon entering (Start()), between stages, while waiting for an action and more.

We do, however, recommend showing the ad upon exiting the application by using the ‘Back’ button, as explained in the previous section.

Add the following code to the appropriate place or places within your activities in which you would like to show the ad:

1. Import the sdk namespace

using StartApp;

2. Load the ad (after calling the init() function)

void Start () {
#if UNITY_ANDROID
StartAppWrapper.init();
StartAppWrapper.loadAd();
#endif
}

3. Show the ad

#if UNITY_ANDROID
StartAppWrapper.showAd();
StartAppWrapper.loadAd();
#endif
Was this article helpful?
0 out of 2 found this helpful
Have more questions? Submit a request

Comments