Package ru.buzzoola.ads.nativeads
Interface NativeAd
-
- All Implemented Interfaces:
public interface NativeAdNative ad.
-
-
Method Summary
Modifier and Type Method Description abstract UnitbindAd(NativeAdView nativeAdView)Binds the specified view with the native ad's content. abstract UnitsetAdEventListener(NativeAdEventListener listener)Sets a listener to receive native ad events. abstract UnitsetImageLoadingListener(NativeAdImageListener listener)Sets a listener to receive native ad image loading events. abstract NativeAdAssetsgetAssets()The ad assets. abstract NativeAdTypegetType()The type of the native ad. abstract Map<String, Object>getMeta()Additional metadata of the native ad. -
-
Method Detail
-
bindAd
abstract Unit bindAd(NativeAdView nativeAdView)
Binds the specified view with the native ad's content.
- Parameters:
nativeAdView- The view to bind with the ad content.
-
setAdEventListener
abstract Unit setAdEventListener(NativeAdEventListener listener)
Sets a listener to receive native ad events.
- Parameters:
listener- The NativeAdEventListener to receive native ad events, ornullto remove the current listener.
-
setImageLoadingListener
abstract Unit setImageLoadingListener(NativeAdImageListener listener)
Sets a listener to receive native ad image loading events.
- Parameters:
listener- The NativeAdImageListener to receive native ad image loading events, ornullto remove the current listener.
-
getAssets
abstract NativeAdAssets getAssets()
The ad assets.
-
getType
abstract NativeAdType getType()
The type of the native ad.
-
getMeta
abstract Map<String, Object> getMeta()
Additional metadata of the native ad.
This map may contain various key-value pairs providing extra information about the ad. All numeric values in this map should be treated as instances of Number. Cast values accordingly before using, for example:
val value = (meta["key"] as? Number)?.toDouble()
-
-
-
-