Self-rendering Banner:: Developers can get the material information of the advertisement for stitching
Supported ad sizes:
- Large picture (Picture with aspect ratio: 1.78)
- Small image (Picture with aspect ratio: 1.52)
- Group pictures (three pictures with aspect ratio: 1.52)
Self-rendering Banner: Reclaimed and no longer available for creation
Note:
1.setImageAcceptedSize aspect ratio is set according to the ratio checked when creating the code bit ID unit px
2. When setNativeAdType requests native ads, please call this method and set the parameter to TYPE_BANNER
Method | Description |
setCodeId() | The code bit ID created by the platform starts with 9 and 9 digits |
setImageAcceptedSize() | Set the size of the requested template creative unit: px |
setNativeAdType() | Request ad type |
setAdCount() | The number of requested ads is 1-3 |
The access party can call loadNativeAd(AdSlot adSlot, @NonNull NativeAdListener listener)
to load ads asynchronously
Callback | Description |
onError() | The error code returned by the ad request failed callback indicates the reason for the ad request failure. For details, please see [link](https://www.pangle.cn/help/doc/5de4cc6d78c8690012a90aa5?from=ad. oceanengine.com&id=5de4cc6d78c8690012a90aa5) |
onNativeAdLoad() | Callback for successful ad request |
Notice:
- Before addView, you need to call the removeAllViews method to remove all the views on the control
-setNativeAdType(AdSlot.TYPE_INTERACTION_AD)//When requesting native ads, be sure to call this method and set the parameter to TYPE_BANNER
-Self-rendering banner is to create a view on the FrameLayout control, add advertising elements to the view, and bind the view to the corresponding control
Get advertising information, such as title, buttonText, etc., through
getAdView()
, and customize the entire advertising area to draw as close as possible to the style of your own application
Note: Important! AdInteractionListener involves advertising billing, convertView must be called correctly and ViewGroup must be used
Method | Description |
onAdClicked() | Click the common area callback |
onAdCreativeClick() | Click on creative area callback |
onAdShow() | Advertising display callback |
The SDK provides information flow advertisements for the access party. When the user chooses to close the advertisement, the user will be asked in the form of a pop-up window, including the options of "Not interested" and "Have seen" for the user to choose. This feedback is mainly used for the advertising strategy of Toutiao ads on the client side, to optimize and increase the click-through rate of the ads, improve the advertising effect and the revenue of the partners
Note:
If using Dislike logic, initialize TTAdNative mTTAdNative =
When ttAdManager.createAdNative(activity), parameters must be passed into activity
After obtaining TTNativeAd, call TTNativeAd.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 3500 SDK. Developers of the SDK below 3500 can refer to the corresponding demo for integration:
Method | 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 |
For self-rendered banner ads, please refer to the NativeBannerActivity
example in Demo
Online Customer Service24/7 Online Customer Service BotManual customer service, weekdays 10~ 12 o'clock/14~ 19 o'clock