public class

BannerView

extends FrameLayout
java.lang.Object
   ↳ android.view.View
     ↳ android.view.ViewGroup
       ↳ android.widget.FrameLayout
         ↳ com.smaato.sdk.banner.widget.BannerView

Summary

Nested Classes
interface BannerView.EventListener A listener for events describing the advertisement lifecycle. 
[Expand]
Inherited Constants
From class android.view.ViewGroup
From class android.view.View
[Expand]
Inherited Fields
From class android.view.View
Public Constructors
BannerView(Context context)
BannerView(Context context, AttributeSet attrs)
BannerView(Context context, AttributeSet attrs, int defStyleAttr)
BannerView(Context context, AttributeSet attrs, int defStyleAttr, int defStyleRes)
Public Methods
void destroy()
This method is used to properly release internal resources of SDK.
String getAdSpaceId()
AutoReloadInterval getAutoReloadInterval()
BannerAdSize getBannerAdSize()
String getCreativeId()
Creative Id (SCI) is only available after the ad has been received successfully.
KeyValuePairs getKeyValuePairs()
String getSessionId()
Session ID is only available after the ad has been received successfully.
void loadAd(String adSpaceId, BannerAdSize bannerAdSize)
Requests new Ad.
void setAutoReloadInterval(AutoReloadInterval bannerAutoReloadInterval)
Sets specified interval between reloads.
void setEventListener(BannerView.EventListener eventListener)
Register listener for receiving events of advertisement lifecycle.
void setKeyValuePairs(KeyValuePairs keyValuePairs)
Sets an KeyValuePairs object to target more specific ads.
void setMediationAdapterVersion(String mediationAdapterVersion)
Used for mediation adapter Should be called before `loadAd`

Sets the mediationAdapterVersion.

void setMediationNetworkName(String mediationNetworkName)
Used for mediation adapter Should be called before `loadAd`

Sets the mediationNetworkName.

void setMediationNetworkSDKVersion(String mediationNetworkSDKVersion)
Used for mediation adapter Should be called before `loadAd`

Sets the mediationNetworkSDKVersion.

[Expand]
Inherited Methods
From class android.widget.FrameLayout
From class android.view.ViewGroup
From class android.view.View
From class java.lang.Object
From interface android.graphics.drawable.Drawable.Callback
From interface android.view.KeyEvent.Callback
From interface android.view.ViewManager
From interface android.view.ViewParent
From interface android.view.accessibility.AccessibilityEventSource

Public Constructors

public BannerView (Context context)

public BannerView (Context context, AttributeSet attrs)

public BannerView (Context context, AttributeSet attrs, int defStyleAttr)

public BannerView (Context context, AttributeSet attrs, int defStyleAttr, int defStyleRes)

Public Methods

public void destroy ()

This method is used to properly release internal resources of SDK.

Call this method when the hosting UI component (Activity or Fragment) is being destroyed (e.g. call it from Activity.onDestroy()).

Once this method is called, this instance of BannerView should not be used any longer.

public String getAdSpaceId ()

Returns

public AutoReloadInterval getAutoReloadInterval ()

Returns

public BannerAdSize getBannerAdSize ()

Returns

public String getCreativeId ()

Creative Id (SCI) is only available after the ad has been received successfully. If fetched before, returns null

Returns
  • Creative Id assigned by Smaato to the ad object

public KeyValuePairs getKeyValuePairs ()

Returns

public String getSessionId ()

Session ID is only available after the ad has been received successfully. If fetched before, returns null

Returns
  • Session ID assigned by Smaato to the ad object

public void loadAd (String adSpaceId, BannerAdSize bannerAdSize)

Requests new Ad.

Parameters
adSpaceId AdSpace ID (assigned by Smaato). Can not be null. If null is passed, then onAdFailedToLoad(BannerView, BannerError) is called with INVALID_REQUEST bannerError.
bannerAdSize a desired dimension of ad to be returned. See BannerAdSize for possible options. Can be null. If null is passed, then SOMA server will use XX_LARGE_320x50.

public void setAutoReloadInterval (AutoReloadInterval bannerAutoReloadInterval)

Sets specified interval between reloads. Default is set to DEFAULT

New interval will be applied for next loaded ad

Parameters
bannerAutoReloadInterval pre-defined value to wait until reload ad. If null is passed, then such call has no effect.

public void setEventListener (BannerView.EventListener eventListener)

Register listener for receiving events of advertisement lifecycle.

Parameters
eventListener listener to set.

public void setKeyValuePairs (KeyValuePairs keyValuePairs)

Sets an KeyValuePairs object to target more specific ads.

Parameters
keyValuePairs to be set

public void setMediationAdapterVersion (String mediationAdapterVersion)

Used for mediation adapter Should be called before `loadAd`

Sets the mediationAdapterVersion.

Parameters
mediationAdapterVersion the mediationAdapterVersion

public void setMediationNetworkName (String mediationNetworkName)

Used for mediation adapter Should be called before `loadAd`

Sets the mediationNetworkName.

Parameters
mediationNetworkName the mediationNetworkName

public void setMediationNetworkSDKVersion (String mediationNetworkSDKVersion)

Used for mediation adapter Should be called before `loadAd`

Sets the mediationNetworkSDKVersion.

Parameters
mediationNetworkSDKVersion the mediationNetworkSDKVersion