public class

MaxAdView

extends RelativeLayout
java.lang.Object
   ↳ android.view.View
     ↳ android.view.ViewGroup
       ↳ android.widget.RelativeLayout
         ↳ com.applovin.mediation.ads.MaxAdView

Class Overview

This class represents a view-based ad - i.e. banner, mrec or leader.

Summary

[Expand]
Inherited Constants
From class android.widget.RelativeLayout
From class android.view.ViewGroup
From class android.view.View
[Expand]
Inherited Fields
From class android.view.View
Public Constructors
MaxAdView(String adUnitId, Activity activity)
Create a new Max ad view.
MaxAdView(String adUnitId, AppLovinSdk sdk, Activity activity)
Create a new Max ad view.
Public Methods
void destroy()
Destroy current ad and fully remove it from memory.
void loadAd()
Load the next banner ad.
void setExtraParameter(String key, String value)
Set an extra parameter to pass to AppLovin server.
void setListener(MaxAdViewAdListener listener)
Set a listener that will be notified about ad events.
void startAutoRefresh()
Starts or resumes auto-refreshing of the banner.
void stopAutoRefresh()
Pauses auto-refreshing of the banner.
String toString()
[Expand]
Inherited Methods
From class android.widget.RelativeLayout
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 MaxAdView (String adUnitId, Activity activity)

Create a new Max ad view.

Parameters
adUnitId Ad unit id to load ads for. Must not be null.
activity Current activity. Must not be null.

public MaxAdView (String adUnitId, AppLovinSdk sdk, Activity activity)

Create a new Max ad view.

Parameters
adUnitId Ad unit id to load ads for. Must not be null.
sdk SDK to use. Must not be null. An instance of the SDK may be obtained by calling AppLovinSdk.getInstance(). See AppLovinSdk for more details.
activity Current activity. Must not be null.

Public Methods

public void destroy ()

Destroy current ad and fully remove it from memory.

public void loadAd ()

Load the next banner ad. Use setListener(MaxAdViewAdListener) to assign a listener that should be notified about ad load state.

public void setExtraParameter (String key, String value)

Set an extra parameter to pass to AppLovin server.

Parameters
key Parameter key. Must not be null.
value Parameter value. May be null.

public void setListener (MaxAdViewAdListener listener)

Set a listener that will be notified about ad events.

Parameters
listener Listener to be notified. May be null.

public void startAutoRefresh ()

Starts or resumes auto-refreshing of the banner.

public void stopAutoRefresh ()

Pauses auto-refreshing of the banner.

public String toString ()