The Interstitial Ads is that cover the interface of an app until closed by the user. It can be skipped after 5 seconds. They're typically displayed at natural transition points in the flow of an app, such as between activities or during the pause between levels in a game. When an app shows an interstitial ad, the user has the choice to either tap on the ad and continue to its destination or close it and return to the app.
Create an app and Interstitial ad placement on Pangle platform
Orienation: Select the orientation of the video.
Ad Type：Video Only(Default) / Video & Image(added).
The main steps to integrate interstitial ads are:
Loading an ad is accomplished using the
loadFullScreenVideoAd method on the
TTAdNative class. The
loadFullScreenVideoAd method requires an
AdSlot Object and a
FullScreenVideoAdListener to be notified when ad loading succeeds or fails. The loaded
TTFullScreenVideoAd object is provided as a parameter in the
onFullScreenVideoAdLoad(TTFullScreenVideoAd ttFullScreenVideoAd) callback.
TTAdNative is an Ad Loading Manager. It is recommended to be the member variable of the Activity. You always need to create a
TTAdNative Object before loading ads.
In this section, you need to pass ad placement id in the method
loadFullScreenVideoAd() method on the
TTAdNative class to load a Fullscreen Video Ad.
This method is invoked when an ad fails to load. It includes an error parameter of type Error that indicates what type of failure occurred. For more information, refer to the ErrorCode section
This method is executed when the video file has finished loading.
This method is executed when an ad material is loaded successfully.
Before the ad to be shown, you need to register ad event callbacks. Passing a
FullScreenVideoAdInteractionListener object to the setter on your ad. The
FullScreenVideoAdInteractionListener provides some Ad Event methods to get notifications of rewarded ad events. Each of the methods in
FullScreenVideoAdInteractionListener corresponds to an event in the lifecycle of a fullscreen video ad.
This method is invoked when the ad is clicked by the user.
This method is invoked when the ad is closed due to the user tapping on the close icon on the endcard.
This method is invoked when the video has finished playing.
The method is invoked when the user skipped the video.
This method is invoked when the ad is displayed, covering the device's screen.
Interstitial ads should be displayed during natural pauses in the flow of an app.
To show an interstitial ad, we recommend using the
onFullScreenVideoCached() method to verify if it's finished loading, then call
showFullScreenVideoAd() method requires
Activity instance. The Activity instance should be the activity from which the interstitial video ad is presented.
The best practice is to load another interstitial ad in the
onAdClose() method on
FullScreenVideoAdInteractionListener so that the next interstitial ad starts loading as soon as the previous one is closed:
Now you have finished the integration. If you wanna test your apps, make sure you use test ads rather than live, production ads. The easiest way to load test ads is to use test mode. It's been specially configured to return test ads for every request, and you're free to use it in your own apps while coding, testing, and debugging.
Refer to the How to add a test device? to add your device to the test devices on Pangle platform.