public interface

AppLovinAdService

com.applovin.sdk.AppLovinAdService

Class Overview

This class is responsible for loading and displaying advertisements.

An instance of this class can be obtained from an AppLovinSdk instance via getAdService().

Summary

Constants
String URI_AD_SERVICE
String URI_API_SERVICE
String URI_CLOSE_AD
String URI_CONTRACT_AD
String URI_EXPAND_AD
String URI_LAUNCH_APP
String URI_NEXT_AD
Public Methods
abstract void addAdUpdateListener(AppLovinAdUpdateListener adListener)
This method is deprecated. Listening to ad updates has been deprecated. The AppLovinAdView class for banners, leaderboards, and mrecs no longer automatically refresh contents by itself. You must explicitly call loadNextAd() or renderAd(AppLovinAd). This method will be removed in a future SDK version.
abstract void addAdUpdateListener(AppLovinAdUpdateListener adListener, AppLovinAdSize adSize)
This method is deprecated. Listening to ad updates has been deprecated. The AppLovinAdView class for banners, leaderboards, and mrecs no longer automatically refresh contents by itself. You must explicitly call loadNextAd() or renderAd(AppLovinAd). This method will be removed in a future SDK version.
abstract String getBidToken()
Generates a token used for advanced header bidding.
abstract boolean hasPreloadedAd(AppLovinAdSize adSize)
This method is deprecated. Manually preloading ads in the background has been deprecated and will be removed in a future SDK version. Please use loadNextAd(AppLovinAdSize, AppLovinAdLoadListener) to load ads to display.
abstract boolean hasPreloadedAdForZoneId(String zoneId)
This method is deprecated. Manually preloading ads in the background has been deprecated and will be removed in a future SDK version. Please use loadNextAdForZoneId(String, AppLovinAdLoadListener) to load ads to display.
abstract void loadNextAd(AppLovinAdSize adSize, AppLovinAdLoadListener callback)
Fetch a new ad, of a given size, notifying a supplied listener on completion.
abstract void loadNextAdForAdToken(String adToken, AppLovinAdLoadListener callback)
Fetch a new ad for the given ad token.
abstract void loadNextAdForZoneId(String zoneId, AppLovinAdLoadListener callback)
Fetch a new ad, for a given zone, notifying a supplied listener on completion.
abstract void loadNextAdForZoneIds(List<String> zoneIds, AppLovinAdLoadListener callback)
Fetch a new ad for any of the provided zone ids.
abstract void preloadAd(AppLovinAdSize adSize)
This method is deprecated. Manually preloading ads in the background has been deprecated and will be removed in a future SDK version. Please use loadNextAd(AppLovinAdSize, AppLovinAdLoadListener) to load ads to display.
abstract void preloadAdForZoneId(String zoneId)
This method is deprecated. Manually preloading ads in the background has been deprecated and will be removed in a future SDK version. Please use loadNextAdForZoneId(String, AppLovinAdLoadListener) to load ads to display.
abstract void removeAdUpdateListener(AppLovinAdUpdateListener adListener, AppLovinAdSize adSize)
This method is deprecated. Listening to ad updates has been deprecated. The AppLovinAdView class for banners, leaderboards, and mrecs no longer automatically refresh contents by itself. You must explicitly call loadNextAd() or renderAd(AppLovinAd). This method will be removed in a future SDK version.

Constants

public static final String URI_AD_SERVICE

Constant Value: "/adservice"

public static final String URI_API_SERVICE

Constant Value: "/api"

public static final String URI_CLOSE_AD

Constant Value: "/adservice/close_ad"

public static final String URI_CONTRACT_AD

Constant Value: "/adservice/contract_ad"

public static final String URI_EXPAND_AD

Constant Value: "/adservice/expand_ad"

public static final String URI_LAUNCH_APP

Constant Value: "/launch"

public static final String URI_NEXT_AD

Constant Value: "/adservice/next_ad"

Public Methods

public abstract void addAdUpdateListener (AppLovinAdUpdateListener adListener)

This method is deprecated.
Listening to ad updates has been deprecated. The AppLovinAdView class for banners, leaderboards, and mrecs no longer automatically refresh contents by itself. You must explicitly call loadNextAd() or renderAd(AppLovinAd). This method will be removed in a future SDK version.

public abstract void addAdUpdateListener (AppLovinAdUpdateListener adListener, AppLovinAdSize adSize)

This method is deprecated.
Listening to ad updates has been deprecated. The AppLovinAdView class for banners, leaderboards, and mrecs no longer automatically refresh contents by itself. You must explicitly call loadNextAd() or renderAd(AppLovinAd). This method will be removed in a future SDK version.

public abstract String getBidToken ()

Generates a token used for advanced header bidding.

public abstract boolean hasPreloadedAd (AppLovinAdSize adSize)

This method is deprecated.
Manually preloading ads in the background has been deprecated and will be removed in a future SDK version. Please use loadNextAd(AppLovinAdSize, AppLovinAdLoadListener) to load ads to display.

public abstract boolean hasPreloadedAdForZoneId (String zoneId)

This method is deprecated.
Manually preloading ads in the background has been deprecated and will be removed in a future SDK version. Please use loadNextAdForZoneId(String, AppLovinAdLoadListener) to load ads to display.

public abstract void loadNextAd (AppLovinAdSize adSize, AppLovinAdLoadListener callback)

Fetch a new ad, of a given size, notifying a supplied listener on completion.

Parameters
adSize Size of an ad to load. Must not be null.
callback A callback to notify of the fact that the ad is loaded. Must not be null. A reference to the callback will be persisted until the ad is loaded.

public abstract void loadNextAdForAdToken (String adToken, AppLovinAdLoadListener callback)

Fetch a new ad for the given ad token. Provided ad token must be received from AppLovin S2S API.

Please note: this method is designed to be called by SDK mediation providers. Please use loadNextAdForZoneId(String, AppLovinAdLoadListener) for regular integrations.

Parameters
adToken Ad token returned from AppLovin S2S API. Must not be null.
callback A callback to notify that the ad has been loaded. Must not be null.

public abstract void loadNextAdForZoneId (String zoneId, AppLovinAdLoadListener callback)

Fetch a new ad, for a given zone, notifying a supplied listener on completion.

Parameters
zoneId The zone to load an ad for. Must not be null.
callback A callback to notify of the fact that the ad is loaded.

public abstract void loadNextAdForZoneIds (List<String> zoneIds, AppLovinAdLoadListener callback)

Fetch a new ad for any of the provided zone ids.

Please note: this method is designed to be called by SDK mediation providers. Please use loadNextAdForZoneId(String, AppLovinAdLoadListener) for regular integrations.

Parameters
zoneIds A list of zone identifiers for which an ad should be loaded. Must not be null.
callback A callback to notify that the ad has been loaded. Must not be null.

public abstract void preloadAd (AppLovinAdSize adSize)

This method is deprecated.
Manually preloading ads in the background has been deprecated and will be removed in a future SDK version. Please use loadNextAd(AppLovinAdSize, AppLovinAdLoadListener) to load ads to display.

public abstract void preloadAdForZoneId (String zoneId)

This method is deprecated.
Manually preloading ads in the background has been deprecated and will be removed in a future SDK version. Please use loadNextAdForZoneId(String, AppLovinAdLoadListener) to load ads to display.

public abstract void removeAdUpdateListener (AppLovinAdUpdateListener adListener, AppLovinAdSize adSize)

This method is deprecated.
Listening to ad updates has been deprecated. The AppLovinAdView class for banners, leaderboards, and mrecs no longer automatically refresh contents by itself. You must explicitly call loadNextAd() or renderAd(AppLovinAd). This method will be removed in a future SDK version.