public class NativeAdLoader
extends java.lang.Object
Class containing controls for native ad loading.

Constructor Summary

Constructors
Constructor and Description
NativeAdLoader(android.content.Context context)
Constructs a new NativeAdLoader with specific configuration.

Method Summary

All Methods
Instance Methods
Concrete Methods
Modifier and TypeMethod and Description
voidcancelLoading()
Cancel loading the native ad.
voidloadAd(NativeAdRequestConfiguration nativeAdRequestConfiguration)
Start loading the native ad by NativeAdRequestConfiguration on a background thread.
voidsetNativeAdLoadListener(NativeAdLoadListener listener)
Register a callback for listening native ad loader.

Methods inherited from class java.lang.Object

equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Constructor Detail

NativeAdLoader

public NativeAdLoader(@NonNull
                      android.content.Context context)
Constructs a new NativeAdLoader with specific configuration.
Parameters:
context - The activity context used to retrieve the application context.

Method Detail

setNativeAdLoadListener

public void setNativeAdLoadListener(@Nullable
                                    NativeAdLoadListener listener)
Register a callback for listening native ad loader.
Parameters:
listener - an NativeAdLoadListener object that handles lifecycle native ad.

loadAd

public void loadAd(@NonNull
                   NativeAdRequestConfiguration nativeAdRequestConfiguration)
Start loading the native ad by NativeAdRequestConfiguration on a background thread.
Parameters:
nativeAdRequestConfiguration - an NativeAdRequestConfiguration object contains targeting information used to fetch a native ad.

cancelLoading

public void cancelLoading()
Cancel loading the native ad.