Template rendering Draw: Developers do not need to edit and render the ad style by themselves, they can directly call the relevant interface to get the ad view for display
Supported ad size: vertical video (aspect ratio 16:9)
Note: Developers are not supported to add buttons to the view and block ads
**Template rendering Draw video ads: ** Provided by default
Note: The template ad request method requires the developer to set the setExpressViewAcceptedSize parameter in dp.
If the height is set to 0, the returned view will be highly adaptive according to the different templates checked on the platform.
Parameter | Description |
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 to 1 |
setExpressViewAcceptedSize | Set the size of the request template creative unit: dp |
Note: In the parameter setting of the desired personalized template size, the personalized template Draw video ad height cannot be set to 0
The access party can call
loadExpressDrawFeedAd(AdSlot adSlot, @NonNull NativeExpressAdListener listener)
to load ads asynchronously
Note: The click event registration time is before the ad render, otherwise it will affect the display and click data reporting
Callback | Description |
onError() | Advertisement request failed callback The returned error code (code) indicates the reason why the advertisement request failed,详情请见链接 |
onNativeExpressAdLoad() | Callback for successful ad request, the client can call |
Callback | Description |
onAdClicked() | The callback of the ad click, the action after the click is controlled by the sdk. |
onAdShow() | Advertisement display callback, display volume can be counted in the method provided by CSJ |
onRenderFail() | Personalized template rendering failed |
onRenderSuccess() | The personalized template is rendered successfully, the client can directly add the view of the advertisement to the control to be displayed in the callback |
Note: After loading the ad, call the
TTNativeExpressAd.render()
method to render the ad. In theonRenderSuccess(View view, float width, float height)
callback, handle the logic of adding the ad view, width&height is The width and height of the ad.
Method | Description |
onVideoLoad() | Video ad loaded successfully callback |
onVideoError() | Video ad loading failed callback |
onVideoAdStartPlay() | Video ad show callback |
onVideoAdPaused() | Video ad pause callback |
onVideoAdContinuePlay() | Video ad rebroadcast callback |
onProgressUpdate() | Video ad playback progress callback |
onVideoAdComplete() | Video ad playback complete callback |
onClickRetry() | Video ad click replay callback |
For template Draw ads, please refer to the DrawNativeExpressVideoActivity
example in Demo
Online Customer Service24/7 Online Customer Service BotManual customer service, weekdays 10~ 12 o'clock/14~ 19 o'clock