Package com.yandex.mobile.ads.nativeads
Class NativeAdLoader
-
- All Implemented Interfaces:
public class NativeAdLoaderClass containing controls for native ad loading.
-
-
Constructor Summary
Constructors Constructor Description NativeAdLoader(Context context)
-
Method Summary
Modifier and Type Method Description final UnitsetNativeAdLoadListener(NativeAdLoadListener listener)Register a callback for listening native ad loader. final UnitloadAd(NativeAdRequestConfiguration nativeAdRequestConfiguration)Start loading the native ad by NativeAdRequestConfiguration on a background thread. final UnitcancelLoading()Cancel loading the native ad. -
-
Constructor Detail
-
NativeAdLoader
NativeAdLoader(Context context)
- Parameters:
context- The activity context used to retrieve the application context
-
-
Method Detail
-
setNativeAdLoadListener
@MainThread() final Unit setNativeAdLoadListener(NativeAdLoadListener listener)
Register a callback for listening native ad loader.
- Parameters:
listener- an NativeAdLoadListener object that handles lifecycle native ad.
-
loadAd
final Unit loadAd(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
final Unit cancelLoading()
Cancel loading the native ad.
-
-
-
-