Native Ad

Declare NativeAd and MediaView class

import com.intowow.sdk.NativeAd;
import com.intowow.sdk.NativeAd.MediaView;

private final static String PLACEMENT_NAME = "Obtain from your Intowow account manager";
private NativeAd mNativeAd  = null;
private MediaView mMediaView = null;

Initialize NativeAd class

mNativeAd = new NativeAd(mActivity);

NOTE : please make sure to pass Activity on to the NativeAd, if you can't, then you may need to pass it on MediaView(Activity); later.

Setup the RequestInfo

  • You need to set the placement ID and the request timeout in requestInfo.

RequestInfo requestInfo = new RequestInfo();
requestInfo.setPlacement(PLACEMENT_NAME);
requestInfo.setTimeout(timeout);

loadAdInstant

With loadAdInstant , our synchronous method , You will get the result of loading ad by CERequestResult directly.

loadAdAsync

loadAdAsync is an asynchronous method, you can set timeout via RequestInfo, and get the result of ad request by CEAdRequestListener.

Add AdListener to get ad event callback.

Register ad

  • You must register ad view to handle user engage after onAdLoaded callback.

Release ad

If you want to get more information about integration, please refer to NativeAd and MediaView

Last updated