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.
Self-rendered patch ads: By default, permission is required
SDK version requirements: 3400 and above
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 |
mTTAdNative.loadStream(adSlot, new TTAdNative.FeedAdListener)
Method to load SMD ads asynchronously
Callback | Description |
onError() | Request failed callback |
onFeedAdLoad() | Request success callback |
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
Callback | Description |
onAdClicked() | Click on the common area to call back |
onAdCreativeClick() | Click the creative area to call back |
onAdShow() | Ad show callback |
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:
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 |
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.
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 |
For self-rendered rendering patches, please refer to StreamActivity
in Demo
Use custom player can refer to StreamCustomPlayerActivity
in Demo
convertView
must be called correctly. **ViewGroup
must be used.Online Customer Service24/7 Online Customer Service BotManual customer service, weekdays 10~ 12 o'clock/14~ 19 o'clock