Help Center/Details/

New Interstitial Ads


The new template rendering interstitial ads developers can choose the size of the ads: divided into full-screen and interstitial, developers can choose the type of ads to be placed in both full-screen and interstitial scenarios, which are picture+video, video only, and picture only.


Template rendering interstitial ads: Open by default
SDK version requirements
Double-ended 3550 and above SDK
Code bit ID creation parameter description:
Request method

Create TTAdNative object

//创建TTAdNative对象,createAdNative(Context context) context需要传入Activity对象
TTAdNative mTTAdNative = TTAdSdk.getAdManager().createAdNative(this);

Template rendering request AdSlot

AdSlot adSlot = new AdSlot.Builder()
        .setOrientation(orientation)//必填参数,期望视频的播放方向:TTAdConstant.HORIZONTAL 或 TTAdConstant.VERTICAL

Parameter description

Method Description
setCodeId() The code ID created by the platform starts with 9 and 9 digits
setExpressViewAcceptedSize() Set the size of the request template creative. Unit: dp The value set is greater than 0
setOrientation() It is expected that the playback direction of the video is consistent with the direction checked in the creation code bit (required)

Request ad

The access party can call loadFullScreenVideoAd(AdSlot adSlot, @NonNull FullScreenVideoAdListener listener) to load ads asynchronously

mTTAdNative.loadFullScreenVideoAd(adSlot, new TTAdNative.FullScreenVideoAdListener() {
    public void onError(int code, String message) {
    public void onFullScreenVideoAdLoad(TTFullScreenVideoAd ad)   {
    public void onFullScreenVideoCached() {


Method Description
onError() Advertisement request failed callback The returned error code (code) indicates the reason why the advertisement request failed. For details, please seeLink:
onFullScreenVideoAdLoad() Callback when ad loading is complete
onFullScreenVideoCached() The callback of the advertisement video/picture loading is completed, the access party can display the advertisement after the callback

Note: For the smoothness of the advertising video material, it is recommended to call the showFullScreenVideoAd method in the main thread to display the advertisement after the onFullScreenVideoCached method is loaded. Set the advertising object to null in time after displaying the advertisement

if (mttFullVideoAd != null&&mIsLoaded) {
    mttFullVideoAd.showFullScreenVideoAd(FullScreenVideoActivity.this, TTAdConstant.RitScenes.GAME_GIFT_BONUS, null);
    mttFullVideoAd = null;
} else {, "请先加载广告");

Advertising interaction listener

mttFullVideoAd.setFullScreenVideoAdInteractionListener(new TTFullScreenVideoAd.FullScreenVideoAdInteractionListener() {
    public void onAdShow() {
    public void onAdVideoBarClick() {

    public void onAdClose() {
    public void onVideoComplete() {
    public void onSkippedVideo() {



Method Description
onAdShow() Ad show callback
onAdVideoBarClick() Advertisement download bar click callback
onAdClose() Ad close callback
onVideoComplete() Video playback complete callback
onSkippedVideo() Skip video playback callback

Destroy the ad object

    protected void onDestroy() {
        if (mttFullVideoAd != null) {
           mttFullVideoAd = null;

Reference Demo
For full-screen video ads, please refer to the FullScreenVideoActivity example in the demo

Did the content solve your problem?
Contact us