public class

AppLovinAdView

extends RelativeLayout
java.lang.Object
   ↳ android.view.View
     ↳ android.view.ViewGroup
       ↳ android.widget.RelativeLayout
         ↳ com.applovin.adview.AppLovinAdView

This class is deprecated.
Banners, MRecs and Leaders are deprecated and will be removed in a future SDK version.

Class Overview

This class provides a subclass of android.view.View which is used to render AppLovin advertisements.

Summary

Constants
String NAMESPACE This is a namespace that should be used for custom properties of AppLovinAdView.
[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
AppLovinAdView(AppLovinAdSize adSize, Activity activity)
Create a new AppLovin ad view.
AppLovinAdView(AppLovinSdk sdk, AppLovinAdSize adSize, Activity activity)
Create a new AppLovin ad view.
Public Methods
void destroy()
Destroy current ad.
AdViewController getAdViewController()
For internal use only.
AppLovinAdSize getSize()
Get current ad view size.
void loadNextAd()
This method is deprecated. Banners, MRecs and Leaders are deprecated and will be removed in a future SDK version.
void pause()
Pause all animations and clear current ad
void renderAd(AppLovinAd ad, String placement)
This method is deprecated. Banners, MRecs and Leaders are deprecated and will be removed in a future SDK version.
void renderAd(AppLovinAd ad)
This method is deprecated. Banners, MRecs and Leaders are deprecated and will be removed in a future SDK version.
void resume()
Resume all animations and the current ad
void setAdClickListener(AppLovinAdClickListener callback)
Set a callback that would be notified of ad click events.
void setAdDisplayListener(AppLovinAdDisplayListener callback)
Set a callback that would be notified of ad display events.
void setAdLoadListener(AppLovinAdLoadListener callback)
Set a callback that would be notified of ad loading events.
void setAdVideoPlaybackListener(AppLovinAdVideoPlaybackListener callback)
Set a callback that may be notified of ad video playback events, if and only if the ad contains a video.
void setAutoDestroy(boolean isAutoDestory)
Change the way ad view handles onDetachedFromWindow() callback.
[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

Constants

public static final String NAMESPACE

This is a namespace that should be used for custom properties of AppLovinAdView.

Constant Value: "http://schemas.applovin.com/android/1.0"

Public Constructors

public AppLovinAdView (AppLovinAdSize adSize, Activity activity)

Create a new AppLovin ad view. Default parameters will be used.

Parameters
adSize Size of the ad to display. Must not be null.
activity Parent activity. Must not be null.

public AppLovinAdView (AppLovinSdk sdk, AppLovinAdSize adSize, Activity activity)

Create a new AppLovin ad view.

Parameters
sdk AppLovin SDK to use. Must not be null. An instance of the SDK may be obtained by calling AppLovinSdk.getInstance(). See AppLovinSdk for more details.
adSize Size of the ad to display. Must not be null.
activity Parent activity. Must not be null.

Public Methods

public void destroy ()

Destroy current ad.

Please note: Ads can not be loaded after the view is destroyed.

public AdViewController getAdViewController ()

For internal use only.

public AppLovinAdSize getSize ()

Get current ad view size.

Returns
  • Current size or null if none defined

public void loadNextAd ()

This method is deprecated.
Banners, MRecs and Leaders are deprecated and will be removed in a future SDK version.

Start loading next advertisement. This method will return immediately. An advertisement will be rendered by this view when available.

public void pause ()

Pause all animations and clear current ad

public void renderAd (AppLovinAd ad, String placement)

This method is deprecated.
Banners, MRecs and Leaders are deprecated and will be removed in a future SDK version.

Render specified ad.

Parameters
ad Ad to render. Must not be null.
placement Placement name.

public void renderAd (AppLovinAd ad)

This method is deprecated.
Banners, MRecs and Leaders are deprecated and will be removed in a future SDK version.

Render specified ad.

Parameters
ad Ad to render. Must not be null.

public void resume ()

Resume all animations and the current ad

public void setAdClickListener (AppLovinAdClickListener callback)

Set a callback that would be notified of ad click events.

Parameters
callback A callback to be notified of ad click events.

public void setAdDisplayListener (AppLovinAdDisplayListener callback)

Set a callback that would be notified of ad display events. These include add displayed and ad hidden.

Parameters
callback A callback to be notified of ad loading events.

public void setAdLoadListener (AppLovinAdLoadListener callback)

Set a callback that would be notified of ad loading events. These include add loaded and ad failed to load events

Parameters
callback A callback to be notified of ad loading events.

public void setAdVideoPlaybackListener (AppLovinAdVideoPlaybackListener callback)

Set a callback that may be notified of ad video playback events, if and only if the ad contains a video.

Parameters
callback A callback to be notified of ad loading events.

public void setAutoDestroy (boolean isAutoDestory)

Change the way ad view handles onDetachedFromWindow() callback. By default isAutoDestory is true and the web view would be destroyed automatically.

Parameters
isAutoDestory True of the view should be destoyed automatically when detached from the window.