English
Log In
You can then view all documents
Installation/Android/New Cinema Ads
New Cinema Ads
Last updated 2022-01-20 10:54:56

New Cinema Ads

Introduction

Slip ads: Slip ads are a form of video advertising. Developers can set the advertising space before/during/after playing the video in their APP. The duration of the patch advertisement can be set to a fixed duration, such as 5s/15s, etc.; the fixed duration can also be unlimited, and the system returns the highest-profit advertisement within the range of 5-60s to help developers maximize revenue. Patch ads currently only support self-rendering. You can use the default CSJ player, or you can apply for the developer's own player.

Permission

Self-rendered patch ads: By default, permission is required
SDK version requirements: 3400 and above

Self-rendering patch request method

Create TTAdNative object

复制

Create ad request type parameter AdSlot

复制

Parameter Description

Parameter

Meaning

setCodeId

The code ID created by the platform starts with 9 and 9 digits

setAdCount

The number of requests is 1-3, it is recommended to set 1

setImageAcceptedSize

Set the size of the requested ad Unit: px

Request ad

mTTAdNative.loadStream(adSlot, new TTAdNative.FeedAdListener)Method to load SMD ads asynchronously

复制

FeedAdListener Description

Callback

Description

onError()

Request failed callback

onFeedAdLoad()

Request success callback

TTFeedAd Interface Description

复制

SMD advertising behavior monitoring

Important!!! AdInteractionListener involves advertising billing, convertView must be called correctly and ViewGroup must be used

After loading the SMD ad, the access party needs to register the View that can be clicked in the SMD ad, that is, the TTFeedAd.registerViewForInteraction() method to realize the functional interaction and calculation of the ad.
Contains the registration of the graphic click area and the registration of the additional creative button click area. For landing page ads, the user clicks on the graphic ad area to jump to the corresponding landing page, and clicks on the additional creative area to perform operations such as phone calls and application downloads.

Note: If you need to click on the graphic area to download or make a call, please pass the view of the graphic area to the creativeViewList, the detailed code is as follows

The sample code of the registration click View example is as follows, the sample fragment is called in the BaseAdapter getView() method of Demo

复制

AdInteractionListener Description

Callback

Description

onAdClicked()

Click on the common area to call back

onAdCreativeClick()

Click the creative area to call back

onAdShow()

Ad show callback

App download status controller

When the returned advertisement is of the application download type, that is, ad.getInteractionType() == TTAdConstant.INTERACTION_TYPE_DOWNLOAD, the access party can call the following sample code to access the Feed ad download controller:

复制

Advertisement download event monitoring

复制

TTAppDownloadListener Description

Callback

Description

onIdle()

Binding download listener callback

onDownloadActive()

Callback during download

onDownloadPaused()

Download pause callback

onDownloadFailed()

Download failed callback

onDownloadFinished()

Download complete callback

onInstalled()

Installation complete callback

Post ads use custom players

If the App has its own player, it can replace the default player in the SDK to play ads, but it needs to handle the life cycle and event callbacks.

Create advertising object package

复制

Use custom player

复制

Video preload timing

复制

Life cycle control

复制

CustomizeVideo

Callback

Description

getVideoUrl()

Get video url

reportVideoStart()

Report play start

reportVideoPause()

Report playback pause

reportVideoContinue()

Report and play continue

reportVideoFinish()

Report the end of playback

reportVideoBreak()

Report the playback suspension

reportVideoAutoStart()

Report auto play

reportVideoStartError()

Report start error

reportVideoError()

Report an error during playback

Reference Demo

For self-rendered rendering patches, please refer to StreamActivity in Demo
Use custom player can refer to StreamCustomPlayerActivity in Demo

Self-rendering patch notes:

  1. AdInteractionListener involves advertising billing, and convertView must be called correctly. **ViewGroup must be used.


Contents
Contact us