Before You Start Make Sure:
- App and Placement set up on Publisher Portal
- SDK is installed
- SDK is initialized
- Each Ad request has "Testing" status which enables it to test integrations.
Our Interstitial ad unit supports fullscreen ads of Video and Display (Static and Rich-Media) ad formats over portrait and landscape orientations. Ad Unit size is 480x320/320x480.
Displaying Interstitial Ads
To show an Interstitial ad you need to call the Ad’s showAd() method.
You may apply an AdEventListener to register your callback for specific events.
ad.setEventListener(new AdEventListener() {
@Override
public void onShown(Ad ad) {
/// integration code
}
@Override
public void onFailedToShow(Ad ad) {
/// integration code
}
@Override
public void onClicked(Ad ad) {
/// integration code
}
@Override
public void onClosed(Ad ad) {
/// integration code
}
@Override
public void onAdCompleted(Ad ad) {
/// integration code
}
});
ad.showAd(Context context);
Note: After showing an ad you may not show it again. Process another AdRequest to get a new ad.
Check the Sample App for a fully-working example.
Comments
0 comments
Please sign in to leave a comment.