Skip to main content

Native/Icon

Customized ads that seamlessly integrate with the app's natural look and style.

Introduction

Ad Types

TypeDescription
NativeContent area contains ad label, logo, main image, title, description, button, and other custom styles. Default request ad quantity is 1 (recommended to use default). When onAdLoaded callback succeeds, display the first ad in the array.
IconTypically content area only contains Icon image. Default request ad quantity is 1, maximum request quantity needs to consult ad Operations Personnel for parameters configured in current ad unit. When onAdLoaded callback succeeds, display the ads in the array. Applicable ad source: Hisavana

Refer to Hisavana ad source as shown in Figure 1, Figure 2:

Figure 1: Native

Figure 2: Icon

We recommend that you download and experience the Mediation Demo to gain a more intuitive and in-depth understanding of the SDK's features and usage. Through the Demo, you can quickly get started and explore its application in real-world scenarios.

Loading Ads

Please configure the corresponding parameters and callback listeners. Be sure to carefully review the documentation for the applicable ad placement types in relevant callbacks to avoid integration discrepancies.

// Initialize Native/Icon ad object, where "native_id"/ "icon_id" is the Native/Icon ad unit ID
TNativeAd tNativeAd = new TNativeAd(this, "native_id"/ "icon_id");
// Build ad request body
TAdRequestBody tAdRequest = new TAdRequestBody.AdRequestBodyBuild()
.setAdListener(new TAdAlliance())
.build();
// Set ad request body
tNativeAd.setRequestBody(tAdRequest);
// After loading ads, return the optimal ad callback within the set waiting time
tNativeAd.loadAd();

// Ad listener, monitors ad load completion (fill), display, click, exception, close actions callbacks
private static class TAdAlliance extends TAdListener {

// Load completion callback (applicable ad units: all ad units)
@Override
public void onLoad() {
// Ad loaded callback
}

// Exception callback (applicable ad units: all ad units)
@Override
public void onError(TAdErrorCode errorCode) {
// Ad failed callback
}

// Display callback (applicable ad units: Native/Icon)
@Override
public void onNativeFeedShow(int source, TAdNativeInfo adNativeInfo){
// Ad show callback
}

// Click callback (applicable ad units: Native/Icon)
@Override
public void onNativeFeedClicked(int source, TAdNativeInfo adNativeInfo) {
// Ad click callback
}

// Close callback (applicable ad units: Hisavana ad source Native/Icon)
@Override
public void onClosed(@Nullable TAdNativeInfo tAdNativeInfo) {
// Ad close callback
}

// Display failure callback (applicable ad units: all ad units)
@Override
public void onShowError(TAdErrorCode errorCode) {
// Ad show failed callback
}
}

Reminder: source represents the ad source, please refer to Ad Source Correlation Table; for example: if this ad fill display is pangle ad, then source=6.

Display Ads

Important Note:

Applicable to Hisavana ad source

Native: For ads redirecting to PalmStore landing page, must add storeMarkView (app store identifier), otherwise it will affect download ad redirection chain.

Icon: Typically no need to set main image, only need to set icon.

Reminder: If you want to display RU-compliant Native ads, see Displaying Ru-Compliant Ads.

Step 1: Create TAdNativeView object.

// Please add TAdNativeView in the parent layout XML
<androidx.constraintlayout.widget.ConstraintLayout
xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
android:layout_width="match_parent"
android:layout_height="match_parent">
<com.hisavana.mediation.ad.TAdNativeView
android:id="@+id/native_view"
android:layout_width="match_parent"
android:layout_height="match_parent" />
</androidx.constraintlayout.widget.ConstraintLayout>
// Bind the view in XML layout
TAdNativeView nativeView = findViewById(R.id.native_view);

or

// Manually create TAdNativeView object and add to parent layout
TAdNativeView nativeView = new TAdNativeView(this);

Step 2: Add child layout file

Native: Applicable to ad sources supporting Native/Icon, specifically refer to Mediation Help, add child layout file native_install.xml for Native ad elements, where icon element is rendered with TIconView, main image with TMediaView.

<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:id="@+id/ad_unit"
android:layout_width="match_parent"
android:layout_height="wrap_content"
tools:ignore="MissingDefaultResource">

<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="vertical">

<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:gravity="center"
android:orientation="horizontal"
android:paddingTop="10dp"
android:paddingBottom="10dp">

<!-- Applicable to ad sources supporting Native/Icon, specifically refer to "Mediation Help" -->
<com.hisavana.mediation.ad.TIconView
android:id="@+id/native_ad_icon"
android:layout_width="80dp"
android:layout_height="80dp"
android:layout_marginLeft="10dp"
android:layout_marginRight="10dp" />

<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="vertical"
android:paddingLeft="5dp"
android:paddingRight="16dp">
<TextView
android:id="@+id/native_ad_title"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginBottom="5dp"
android:ellipsize="end"
android:lines="1"
android:text="Title"
android:textColor="@android:color/black"
android:textSize="18sp" />
<TextView
android:id="@+id/native_ad_body"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:ellipsize="end"
android:maxLines="2"
android:text="des1"
android:textColor="@android:color/black"
android:textSize="15sp" />
<TextView
android:id="@+id/des2"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:ellipsize="end"
android:maxLines="2"
android:text=""
android:textColor="@android:color/black"
android:textSize="15sp" />
<RatingBar
android:id="@+id/rating"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:isIndicator="false"
android:numStars="5"
android:stepSize="0.5"/>
</LinearLayout>
</LinearLayout>

<!-- Applicable to ad sources supporting Native/Icon, specifically refer to "Mediation Help" -->
<com.hisavana.mediation.ad.TMediaView
android:id="@+id/coverview"
android:layout_width="match_parent"
android:layout_height="wrap_content" />
<Button
android:id="@+id/call_to_action"
android:paddingVertical="10dp"
android:layout_marginHorizontal="10dp"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_gravity="center_vertical"
android:text="DOWNLOAD NOW!"
android:gravity="center"
android:textAllCaps="false" />
</LinearLayout>

<!-- Ad corner label, applicable to ad sources Hisavana, Facebook, Pangle, Mintegral, Bigo -->
<com.hisavana.mediation.ad.TAdChoicesView
android:id="@+id/adChoicesView"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginStart="150dp"
android:layout_marginTop="100dp" />

<!-- Close button, applicable to ad source Hisavana -->
<com.hisavana.mediation.ad.TAdCloseView
android:id="@+id/adCloseView"
android:layout_toLeftOf="@+id/adChoicesView"
android:layout_width="12dp"
android:layout_height="12dp"/>

<!-- Hisavana ad source: For ads redirecting to PalmStore landing page, must add storeMarkView (app store identifier), otherwise it will affect download ad redirection chain. -->
<com.hisavana.mediation.ad.TStoreMarkView
android:id="@+id/store_mark_view"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_margin="20dp"
android:layout_alignParentStart="true"
android:layout_alignParentTop="true" />
</RelativeLayout>

Icon: Applicable to Hisavana ad source, add child layout file item_icon.xml for Icon ad elements

<androidx.constraintlayout.widget.ConstraintLayout
xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
xmlns:app="http://schemas.android.com/apk/res-auto"
android:id="@+id/ad_unit"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:background="@mipmap/item_background">

<com.hisavana.mediation.ad.TIconView
android:id="@+id/ad_icon"
android:layout_width="80dp"
android:layout_height="80dp"
android:scaleType="fitCenter"
app:layout_constraintTop_toTopOf="parent"
app:layout_constraintLeft_toLeftOf="parent"/>
</androidx.constraintlayout.widget.ConstraintLayout>

Step 3: Data and View Binding

Native: Applicable to ad sources supporting Native/Icon, specifically refer to Mediation Help, binding as shown below

Use TNativeAd object to bundle TAdNativeView, TAdNativeInfo, and ViewBinder objects.

if (tNativeAd != null && tNativeAd.hasAd()) {

// Get all TAdNativeInfo through tNativeAd, typically array has only one data item
List<TAdNativeInfo> nativeInfos = tNativeAd.getNativeAdInfo();
if (nativeInfos != null && !nativeInfos.isEmpty()) {

// Single page single ad scenario, need to release previous mNativeInfo resources before display
if (mNativeInfo != null) {
mNativeInfo.release();
}

// Global variable mNativeInfo defined in single page, purpose is to release previous mNativeInfo resources before single ad scenario display, and uniformly release resources at "onDestroy()"
mNativeInfo = nativeInfos.get(0);
if (mNativeInfo == null) return;

// Child layout information storage
ViewBinder viewBinder = new ViewBinder.Builder(R.layout.native_install)
// Set title control id
.titleId(R.id.native_ad_title)
// Set icon control id
.iconId(R.id.native_ad_icon)
// Set call-to-action control id
.callToActionId(R.id.call_to_action)
// Set description control id
.descriptionId(R.id.native_ad_body)
// Set ad main image control id
.mediaId(R.id.coverview)
// Set ad corner label control id
.adChoicesView(R.id.adChoicesView)
// Set ad close control id
.adCloseView(R.id.adCloseView)
// Required, set app store identifier control id
.storeMarkView(R.id.store_mark_view)
// If need custom ad click events, call `actionIds(Integer... actionIds)` method, add relevant view ids
.actionIds(R.id.call_to_action)
.sponsoredId(R.id.sponsored)
.ratingId(R.id.rating)
.priceId(R.id.price)
.likesId(R.id.likes)
.downloadsId(R.id.downloads)
/**
* Native ad rendering modes:
* NativeContextMode.NORMAL: Normal mode
* NativeContextMode.LIST: List mode
*/
.contextMode(NativeContextMode.NORMAL)
.build();

// Check if ad is expired
if (mNativeInfo.isExpired()) {
AdLogUtil.Log().d("NativeAdActivity", "Expired");
} else {
// Data and view binding
tNativeAd.bindNativeView(nativeView, mNativeInfo, viewBinder);

}
}
}

Icon: Applicable to Hisavana ad source, binding as shown below

if (tNativeAd != null && tNativeAd.hasAd()) {

// Get all TAdNativeInfo through tNativeAd
List<TAdNativeInfo> nativeInfos = tNativeAd.getNativeAdInfo();
if (nativeInfos != null && !nativeInfos.isEmpty()) {

// When single page needs to display multiple ads, no need to release resources here, please uniformly release resources at "onDestroy()"
if (mNativeInfo != null) {
mNativeInfo.release();
}

// Example only shows single page single icon ad, if need to display multiple can self-implement via RecyclerView add binding
mNativeInfo = nativeInfos.get(0);
if (mNativeInfo == null) return;

// Child layout information storage
ViewBinder viewBinder = new ViewBinder.Builder(R.layout.item_icon)
// Set icon control id
.iconId(R.id.ad_icon)
/**
* Ad rendering modes:
* NativeContextMode.NORMAL: Normal mode
* NativeContextMode.LIST: List mode
*/
.contextMode(NativeContextMode.NORMAL)
.build();

// Check if ad is expired
if (mNativeInfo.isExpired()) {
AdLogUtil.Log().d("NativeAdActivity", "Expired");
} else {
// Data and view binding
tNativeAd.bindNativeView(nativeView, mNativeInfo, viewBinder);
}
}
}
/**
* Optional
* For applications that need to track ad scenario reach, you can set scenario values yourself
* Main purpose is to track current ad scenario utilization rate, first parameter custom scenario name, second parameter ad quantity
*/
String sceneToken = tNativeAd.enterScene("native_scene_name", 1);
tNativeAd.bindNativeView(nativeView, mNativeInfo, viewBinder, sceneToken);

List Scenario

The following scenario applies to Native ads

Define data class to save nativeInfo and sceneToken

public calss ItemBean{
private TAdNativeInfo nativeInfo;
private TNativeAd nativeAd;
public String sceneToken;
}

Binding layout in list

@Override
public void onBindViewHolder(@NonNull RecyclerView.ViewHolder vhHolder, int position) {
ItemBean itemBean = data.get(position);
// Main purpose is to track current ad scenario utilization rate, first parameter custom scenario name, second parameter ad quantity
if(TextUtils.isEmpty(itembean.sceneToken)){
itemBean.sceneToken = tNativeAd.enterScene("native_scene_name", 1);
}
List<TAdNativeInfo> nativeInfos = tNativeAd.getNativeInfo();
itemBean.nativeInfo = nativeInfos.isEmpty ? null : nativeInfos.get(0)
if(itemBean.nativeInfo == null || itemBean.nativeInfo.isExpired()){
// Reload current ad
...
return;
}
//User builds ViewBinder
...
//Display ad
itemBean.tNativeAd.bindNativeView(nativeView, itemBean.nativeInfo, viewBinder, itemBean.sceneToken);
}

Destroy Ads

Please recycle ads promptly, otherwise the App may experience memory leaks.

// This callback applies to Hisavana ad source, recommended to uniformly release resources at "onDestroy()", subsequent versions will remove this callback
@Override
public void onClosed(TAdNativeInfo tAdNativeInfo) {
/**
* When clicking ad close button, please release ad resources
* If in list scenario, can determine current ad position in list based on taNativeInfo, dynamically delete
*/
if(tAdNativeInfo == mNativeInfo){
if(mNativeInfo != null) {
mNativeInfo.release();
}
if (nativeView != null) {
nativeView.release();
}
mNativeInfo = null;
nativeView = null;
}
}

The following example only releases resources for single page single Native/Icon ad; multiple Native/Icon scenarios need the integrator to self-manage uniformly releasing resources at onDestroy(), release objects are TNativeAd, TAdNativeInfo, TAdNativeView, specifically refer to Mediation Demo

// After exiting the ad scenario, please destroy the ad object.
@Override
protected void onDestroy() {
if (tNativeAd != null) {
tNativeAd.destroy();
tNativeAd = null;
}
if(mNativeInfo != null) {
mNativeInfo.release();
}
if (nativeView != null) {
nativeView.release();
}
mNativeInfo = null;
nativeView = null;
super.onDestroy();
}

Other APIs

API CallDescription
tNativeAd.hasAd()Whether there is currently an available ad
mNativeInfo.isExpired()Used to determine whether the advertisement is in the delivery period and used before displaying the advertisement

Advanced Settings

Hisavana
Other

Required Ad Elements

HisavanaAdmobFacebookPangleMintegralYandexBigo
Media(mediaId)RequiredRequiredRequiredRequiredRequiredRequiredOptional
AdChoices(adChoicesView)RequiredAdmob renders itselfRequiredRequiredRequiredNoneOptional
Title(titleId)OptionalRequiredRequiredRequiredRequiredRequiredOptional
Icon(iconId)OptionalRequiredRequiredRequiredRequiredRequiredOptional
Close Button(adCloseView)OptionalAdd it yourself
(Google recommends that it is required)
NoneNoneNoneNoneNone
Store Mark Icon(adStoreMarkView)RequiredNoneNoneNoneNoneNoneNone
Description(descriptionId)OptionalOptionalOptionalRequiredRequiredOptionalOptional
Button(callToActionId)OptionalRequiredRequiredRequiredRequiredRequiredOptional
Rating(ratingId)OptionalOptionalNoneNoneNoneOptionalNone
Price(priceId)NoneOptionalNoneNoneNoneRequiredNone
Sponsored(sponsoredId)NoneNoneNoneNoneNoneRequiredNone
Disclaimer(adDisclaimerView)RU RequiredNoneNoneNoneNoneRequiredNone
RU Compliance Badge(adBadgeView)RU RequiredNoneNoneNoneNoneNoneNone
Domain(domainId)NoneNoneNoneNoneNoneRequiredNone
Feedback(feedbackId)NoneNoneNoneNoneNoneRequiredNone

Displaying RU-Compliant Ads

Developers whose products are published in Russia and monetized through mediation-lib (integrated mediation-lib sdk) must strictly comply with Russian advertising laws.

mediation-lib sdk version 3.0.8 and above supports displaying RU-compliant ads, requiring you to do some additional integration-related operations when self-rendering Native ads, applicable to Hisavana ad source.

The main integration difference is in Step 2 and Step 3 of the Displaying Ads section, we need to replace the display method of the ad badge view, and add a disclaimer view.

Reminder: The following general version refers to the non-RU compliant version.

Step 1: Create TAdNativeView object.

Same as above.

Step 2: Add child layout file

Add child layout file native_install.xml for Native ad elements, where icon element is rendered with TIconView, main image with TMediaView.

<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:id="@+id/ad_unit"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="@drawable/item_background"
xmlns:app="http://schemas.android.com/apk/res-auto"
tools:ignore="MissingDefaultResource">

<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="vertical">

<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:gravity="center"
android:orientation="horizontal"
android:paddingTop="10dp"
android:paddingBottom="10dp">

<com.hisavana.mediation.ad.TIconView
android:id="@+id/native_ad_icon"
android:layout_width="80dp"
android:layout_height="80dp"
android:layout_marginLeft="10dp"
android:layout_marginRight="10dp" />

<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="vertical"
android:paddingLeft="5dp"
android:paddingRight="16dp">

<TextView
android:id="@+id/native_ad_title"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginBottom="5dp"
android:ellipsize="end"
android:lines="1"
android:text="Title"
android:textColor="@android:color/black"
android:textSize="18sp" />

<TextView
android:id="@+id/native_ad_body"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:ellipsize="end"
android:maxLines="2"
android:text="des1"
android:textColor="@android:color/black"
android:textSize="15sp" />

<!-- des2 -->
<TextView
android:id="@+id/des2"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:ellipsize="end"
android:maxLines="2"
android:text=""
android:textColor="@android:color/black"
android:textSize="15sp" />
<RatingBar
android:id="@+id/rating"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:numStars="5"
android:stepSize="0.5"
android:isIndicator="false"/>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="horizontal">

<TextView
android:id="@+id/price"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1"
android:text="price" />

<TextView
android:id="@+id/likes"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1"
android:text="Likes" />

<TextView
android:id="@+id/downloads"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1"
android:text="Downloads" />

</LinearLayout>
</LinearLayout>
</LinearLayout>

<FrameLayout
android:layout_width="match_parent"
android:layout_height="wrap_content">

<com.hisavana.mediation.ad.TMediaView
android:id="@+id/coverview"
android:layout_width="match_parent"
android:layout_height="wrap_content" />

<!-- Required: RU compliant version disclaimer View -->
<com.hisavana.mediation.ad.TAdDisclaimerView
android:id="@+id/ad_disclaimer_view"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_gravity="bottom"/>

</FrameLayout>

<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="10dp"
android:layout_marginBottom="10dp"
android:orientation="horizontal">

<TextView
android:id="@+id/sponsored"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_gravity="center_vertical"
android:layout_marginRight="12dp"
android:layout_weight="1"
android:paddingLeft="16dp"
android:text="Sponsored"
android:textSize="15sp" />

<Button
android:id="@+id/call_to_action"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_gravity="center_vertical"
android:layout_weight="1"
android:text="DOWNLOAD NOW!"
android:textAllCaps="false" />
</LinearLayout>

</LinearLayout>

<!-- Ad source label -->
<com.hisavana.mediation.ad.TAdChoicesView
android:id="@+id/adChoicesView"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentEnd="true"
android:layout_alignParentTop="true"/>

<com.hisavana.mediation.ad.TAdCloseView
android:id="@+id/adCloseView"
android:layout_toStartOf="@+id/adChoicesView"
android:layout_width="wrap_content"
android:layout_height="wrap_content" />

<com.hisavana.mediation.ad.TStoreMarkView
android:id="@+id/store_mark_view"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_margin="20dp"
android:layout_alignParentStart="true"
android:layout_alignParentTop="true" />

<!-- Required: RU compliant version AD badge -->
<com.hisavana.mediation.ad.TAdBadgeView
android:id="@+id/ad_badge_view"
android:layout_width="wrap_content"
android:layout_height="wrap_content" />

</RelativeLayout>

Step 3: Bundle Data and View

Use TNativeAd object to bundle TAdNativeView, TAdNativeInfo, and ViewBinder objects.

if (tNativeAd != null && tNativeAd.hasAd()) {

// Get all TAdNativeInfo through tNativeAd, typically array has only one data item
List<TAdNativeInfo> nativeInfos = tNativeAd.getNativeAdInfo();
if (nativeInfos != null && !nativeInfos.isEmpty()) {

// Single page single ad scenario, need to release previous mNativeInfo resources before display
if (mNativeInfo != null) {
mNativeInfo.release();
}

// Global variable mNativeInfo defined in single page, purpose is to release previous mNativeInfo resources before single ad scenario display, and uniformly release resources at "onDestroy()"
mNativeInfo = nativeInfos.get(0);
if (mNativeInfo == null) return;

// Child layout information storage
ViewBinder viewBinder = new ViewBinder.Builder(R.layout.native_install)
// Set title control id
.titleId(R.id.native_ad_title)
// Set icon control id
.iconId(R.id.native_ad_icon)
// Set call-to-action control id
.callToActionId(R.id.call_to_action)
// Set description control id
.descriptionId(R.id.native_ad_body)
// Set ad main image control id
.mediaId(R.id.coverview)
// Set ad source control id
.adChoicesView(R.id.adChoicesView)
// Required: Set RU compliant version AD badge
.adBadgeView(R.id.ad_badge_view)
// Set ad close control id
.adCloseView(R.id.adCloseView)
// Required: Set app store identifier control id
.storeMarkView(R.id.store_mark_view)
// If need custom ad click events, call `actionIds(Integer... actionIds)` method, add relevant view ids
.actionIds(R.id.call_to_action)
.sponsoredId(R.id.sponsored)
.ratingId(R.id.rating)
.priceId(R.id.price)
.likesId(R.id.likes)
.downloadsId(R.id.downloads)
// Required: Set RU compliant version disclaimer
.adDisclaimerView(R.id.ad_disclaimer_view)
/**
* Native ad rendering modes:
* NativeContextMode.NORMAL: Normal mode
* NativeContextMode.LIST: List mode
*/
.contextMode(NativeContextMode.NORMAL)
.build();
// Check if ad is expired
if (mNativeInfo.isExpired()) {
AdLogUtil.Log().d("NativeAdActivity", "Expired");
} else {
// Data and view binding
tNativeAd.bindNativeView(nativeView, mNativeInfo, viewBinder);
}
}
}
/**
* Optional
* For applications that need to track ad scenario reach, you can set scenario values yourself
* Main purpose is to track current ad scenario utilization rate, first parameter custom scenario name, second parameter ad quantity
*/
String sceneToken = tNativeAd.enterScene("native_scene_name", 1);
tNativeAd.bindNativeView(nativeView, mNativeInfo, viewBinder, sceneToken);