English
Log In
You can then view all documents
Installation/Android/Self-rendering Feed Ads
Self-rendering Feed Ads
Last updated 2022-01-19 22:03:21

Origin Rendering Feed Ads

Introduction

Self-rendering information flow: It is an information flow advertisement with a customizable layout. It contains four basic styles: big picture, small picture, group picture and video, phone call, application download, jump to landing page, jump Four types of interaction to the browser. Title and description length is 6-26 characters

Supported ad sizes:

  • Large picture (Picture with aspect ratio: 1.78)
  • Video (Aspect ratio: 1.78 video)
  • Small image (Picture with aspect ratio: 1.52)
  • Group pictures (three pictures with aspect ratio: 1.52)

Permission

**Self-rendering information flow ads: ** Reclaimed and no longer available for creation

Self-rendering information flow request method

Create TTAdNative object

复制

Create ad request type parameter AdSlot

复制

Parameter Description

Parameter

Description

setCodeId

The code bit 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 ads

Call the TTAdNative.loadFeedAd(AdSlot adSlot, FeedAdListener listener) method to load the feed asynchronously

复制

FeedAdListener description

Callback

Description

onError()

Request failed callback

onFeedAdLoad()

Request success callback

TTFeedAd interface description

复制

Information flow advertising behavior monitoring

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

After loading the information flow advertisement, the access party needs to register the view that can be clicked in the information flow advertisement, that is, the TTFeedAd.registerViewForInteraction() method to realize the functional interaction and calculation of the advertisement.
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 the common area callback

onAdCreativeClick()

Click on creative area callback

onAdShow()

Advertising display callback

Information flow video callback interface

复制

VideoAdListener description

Callback

Description

onVideoLoad()

Video loading success callback

onVideoError()

Video loading failed callback

onVideoAdStartPlay()

Video start playing callback

onVideoAdPaused()

Video ad pause callback

onVideoAdContinuePlay()

Video ad needs to play callback

onProgressUpdate()

Video playback progress callback

onVideoAdComplete()

Video playback complete 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 in downloading

onDownloadPaused()

Download Paused Callback

onDownloadFailed()

Download failed callback

onDownloadFinished()

Download complete callback

onInstalled()

Installation complete callback

Information flow advertising access Dislike

After obtaining TTFeedAd, call TTFeedAd.getDislikeDialog() to obtain the TTAdDislike object, and then set the user selection result callback for the object.

The following logic is the logic in the CSJ version 3500 SDK. SDK developers below 3500 version can refer to the corresponding demo for integration

复制

DislikeInteractionCallback

Callback

Description

onItemClick()

Callback when user clicks filterWord in the case of custom style

onClick()

User clicked "Why see this ad" in the case of custom styles

onSelected()

Default dislike style, click filterWord to call back. Developers can remove ads in this callback

onCancel()

The default dislike style, click to cancel the callback

onShow()

default dislike style, dislike pop-up window display back

onRefuse()

The default dislike style, the user repeatedly clicks the dislike button to call back, version 3600 is abolished

Destroy advertising objects

Destroy the ad view in the onDestroy callback method of Activity

复制

Reference Demo

Please refer to the CSJ Demo and the listitem_ad_pic.xml file under /res/layout/.
For detailed code of self-rendering rendering information flow using ListView, please refer to FeedListActivity in Demo
Use RecyclerView to see FeedRecyclerActivity in Demo

Self-rendering information flow note:

  1. AdInteractionListener involves advertising billing, and convertView must be called correctly. **ViewGroup must be used.
  2. TTAdDislike supports self-rendering information flow ads, self-rendering Banner ads


Contents
Contact us