Reputation: 39
I wanted to add an interstitial ads to show on the mainactivity after certain time interval. I search, it seems there is no reference code to do so. Appreciate your help how do I do this? Any sample code will be useful. Thanks.
Upvotes: 1
Views: 4355
Reputation: 51
interstitialAd.setAdListener(new AdListener() {
public void onAdLoaded() {
Handler handler = new Handler();
handler.postDelayed(new Runnable() {
public void run() {
MainActivity.this.interstitialAd.show();
}
}, 5000);
}
});
Upvotes: 0
Reputation: 20196
interstitial.show()
when it times out.Upvotes: 3