Package com.magnite.sdk.adsbase
Class MagniteInterstitialAd
java.lang.Object
com.magnite.sdk.adsbase.Ad
com.magnite.sdk.adsbase.MagniteInterstitialAd
- All Implemented Interfaces:
com.magnite.sdk.adsbase.DeveloperInterface
- Direct Known Subclasses:
MagniteRewardedAd
public class MagniteInterstitialAd
extends com.magnite.sdk.adsbase.Ad
implements com.magnite.sdk.adsbase.DeveloperInterface
Represents an Interstitial Ad - a full screen ad which may be displayed during a natural
transition points such as a screen change, after the game over screen, before loading the next
game level, etc.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic enumRepresents different kinds of ad contentNested classes/interfaces inherited from class com.magnite.sdk.adsbase.Ad
com.magnite.sdk.adsbase.Ad.AdState, com.magnite.sdk.adsbase.Ad.AdType -
Field Summary
Fields inherited from class com.magnite.sdk.adsbase.Ad
activityExtra, adCacheManager, adCacheTtl, belowMinCPM, consentData, consentManager, context, errorMessage, eventTracer, extraData, httpClient, networkApiExecutor, placement, videoAdCacheManager, webViewCacheLoader, webViewFactory -
Constructor Summary
ConstructorsConstructorDescriptionMagniteInterstitialAd(android.content.Context context) It is recommended to keep an instance in memory as a Singleton object, and then reuse it multiple times to load and show ads. -
Method Summary
Modifier and TypeMethodDescriptionstatic voidDeprecated.static voidenableConsent(android.content.Context context, boolean enabled) Deprecated.static voidDeprecated.booleanisReady()Deprecated.voidload(com.magnite.sdk.adsbase.model.AdPreferences adPreferences, AdEventListener callback) Deprecated.voidload(com.magnite.sdk.adsbase.model.AdPreferences adPreferences, AdEventListener callback, String adm) Deprecated.voidloadAd()Alias forloadAd(AdMode.AUTOMATIC, new AdPreferences(), null);voidloadAd(AdEventListener listener) Alias forloadAd(AdMode.AUTOMATIC, new AdPreferences(), listener, null);voidloadAd(AdEventListener listener, String adm) Alias forloadAd(AdMode.AUTOMATIC, new AdPreferences(), listener, adm);voidloadAd(MagniteInterstitialAd.AdMode adMode) Alias forloadAd(adMode, new AdPreferences(), null);voidloadAd(MagniteInterstitialAd.AdMode adMode, AdEventListener listener) Alias forloadAd(adMode, new AdPreferences(), listener);voidloadAd(MagniteInterstitialAd.AdMode adMode, com.magnite.sdk.adsbase.model.AdPreferences adPreferences) Alias forloadAd(adMode, adPreferences, null);voidloadAd(MagniteInterstitialAd.AdMode adMode, com.magnite.sdk.adsbase.model.AdPreferences adPreferences, AdEventListener listener, String adm) Loads ad according to theadModeandadPreferencesgiven.voidloadAd(com.magnite.sdk.adsbase.model.AdPreferences adPreferences) Alias forloadAd(AdMode.AUTOMATIC, adPreferences, null);voidloadAd(com.magnite.sdk.adsbase.model.AdPreferences adPreferences, AdEventListener listener) Alias forloadAd(AdMode.AUTOMATIC, adPreferences, listener, adm);booleanshowAd()Shows an ad, if it has been loaded.booleanshowAd(AdDisplayListener listener) Shows an ad, if it has been loaded.booleanDeprecated.booleanshowAd(String adTag, AdDisplayListener listener) Deprecated.Methods inherited from class com.magnite.sdk.adsbase.Ad
canShowAd, createService, getAdCacheTtl, getAdId, getAdInfoOverride, getBidToken, getConsentData, getContext, getDParam, getErid, getEridUrl, getErrorMessage, getExtraData, getFallbackAdCacheTtl, getLastLoadTime, getNotDisplayedReason, getPlacement, getRequestUrl, getState, getType, getVideoCancelCallBack, hasAdCacheTtlPassed, isBelowMinCPM, isTiedToAdm, load, load, load, loadAds, resolveActivityToShowAd, setActivityExtra, setAdInfoOverride, setContext, setErid, setEridUrl, setErrorMessage, setExtraData, setNotDisplayedReason, setRequestUrl, setState, setVideoCancelCallBackMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface com.magnite.sdk.adsbase.DeveloperInterface
close, loadAd, loadAd, onBackPressed, onPause, onRestoreInstanceState, onResume, onSaveInstanceState
-
Constructor Details
-
MagniteInterstitialAd
public MagniteInterstitialAd(@NonNull android.content.Context context) It is recommended to keep an instance in memory as a Singleton object, and then reuse it multiple times to load and show ads. In other words, an instance should not be linked to theActivitylifecycle, and it should survive theActivityrecreation.- Parameters:
context-Applicationcontext
-
-
Method Details
-
init
Deprecated.This method will be removed in version4.12.0- See Also:
-
load
@Deprecated public void load(@Nullable com.magnite.sdk.adsbase.model.AdPreferences adPreferences, @Nullable AdEventListener callback) Deprecated.- Overrides:
loadin classcom.magnite.sdk.adsbase.Ad
-
load
@Deprecated public void load(@Nullable com.magnite.sdk.adsbase.model.AdPreferences adPreferences, @Nullable AdEventListener callback, @Nullable String adm) Deprecated.- Overrides:
loadin classcom.magnite.sdk.adsbase.Ad- See Also:
-
loadAd
public void loadAd()Alias forloadAd(AdMode.AUTOMATIC, new AdPreferences(), null);- Specified by:
loadAdin interfacecom.magnite.sdk.adsbase.DeveloperInterface- See Also:
-
DeveloperInterface.loadAd(AdMode, AdPreferences, AdEventListener)
-
loadAd
public void loadAd(@NonNull com.magnite.sdk.adsbase.model.AdPreferences adPreferences) Alias forloadAd(AdMode.AUTOMATIC, adPreferences, null);- Specified by:
loadAdin interfacecom.magnite.sdk.adsbase.DeveloperInterface- See Also:
-
DeveloperInterface.loadAd(AdMode, AdPreferences, AdEventListener)
-
loadAd
Alias forloadAd(AdMode.AUTOMATIC, new AdPreferences(), listener, null);- Specified by:
loadAdin interfacecom.magnite.sdk.adsbase.DeveloperInterface- See Also:
-
DeveloperInterface.loadAd(AdMode, AdPreferences, AdEventListener)
-
loadAd
Alias forloadAd(AdMode.AUTOMATIC, new AdPreferences(), listener, adm);- Specified by:
loadAdin interfacecom.magnite.sdk.adsbase.DeveloperInterface- See Also:
-
DeveloperInterface.loadAd(AdMode, AdPreferences, AdEventListener)
-
loadAd
public void loadAd(@NonNull com.magnite.sdk.adsbase.model.AdPreferences adPreferences, @NonNull AdEventListener listener) Alias forloadAd(AdMode.AUTOMATIC, adPreferences, listener, adm);- Specified by:
loadAdin interfacecom.magnite.sdk.adsbase.DeveloperInterface- See Also:
-
DeveloperInterface.loadAd(AdMode, AdPreferences, AdEventListener)
-
loadAd
Alias forloadAd(adMode, new AdPreferences(), null);- Specified by:
loadAdin interfacecom.magnite.sdk.adsbase.DeveloperInterface- See Also:
-
DeveloperInterface.loadAd(AdMode, AdPreferences, AdEventListener)
-
loadAd
public void loadAd(@NonNull MagniteInterstitialAd.AdMode adMode, @NonNull com.magnite.sdk.adsbase.model.AdPreferences adPreferences) Alias forloadAd(adMode, adPreferences, null);- Specified by:
loadAdin interfacecom.magnite.sdk.adsbase.DeveloperInterface- See Also:
-
DeveloperInterface.loadAd(AdMode, AdPreferences, AdEventListener)
-
loadAd
Alias forloadAd(adMode, new AdPreferences(), listener);- Specified by:
loadAdin interfacecom.magnite.sdk.adsbase.DeveloperInterface- See Also:
-
DeveloperInterface.loadAd(AdMode, AdPreferences, AdEventListener)
-
loadAd
public void loadAd(@NonNull MagniteInterstitialAd.AdMode adMode, @Nullable com.magnite.sdk.adsbase.model.AdPreferences adPreferences, @Nullable AdEventListener listener, @Nullable String adm) Loads ad according to theadModeandadPreferencesgiven.- Specified by:
loadAdin interfacecom.magnite.sdk.adsbase.DeveloperInterface- Parameters:
adMode- one ofMagniteInterstitialAd.AdMode.AUTOMATIC,MagniteInterstitialAd.AdMode.FULLPAGE,MagniteInterstitialAd.AdMode.VIDEOorMagniteInterstitialAd.AdMode.REWARDED_VIDEOfor the Rewarded Video AdadPreferences- ad preferenceslistener- a callback to be invoked when ad finishes loading
-
showAd
public boolean showAd()Shows an ad, if it has been loaded.- Specified by:
showAdin interfacecom.magnite.sdk.adsbase.DeveloperInterface- Returns:
trueif the ad has been shown
-
showAd
Deprecated.This method will be removed in version4.12.0The
adTagvalue must be set intoAdPreferencesand passed intoDeveloperInterface.loadAd(AdMode, AdPreferences, AdEventListener)- Specified by:
showAdin interfacecom.magnite.sdk.adsbase.DeveloperInterface- Parameters:
adTag- adTag- Returns:
trueif the ad has been shown- See Also:
-
AdPreferences.setAdTag(String)
-
showAd
Shows an ad, if it has been loaded.- Specified by:
showAdin interfacecom.magnite.sdk.adsbase.DeveloperInterface- Parameters:
listener- callback to be invoked when an ad events occurred- Returns:
- true if ad has shown
-
showAd
Deprecated.This method will be removed in version4.12.0The
adTagvalue must be set intoAdPreferencesand passed intoDeveloperInterface.loadAd(AdMode, AdPreferences, AdEventListener)- Specified by:
showAdin interfacecom.magnite.sdk.adsbase.DeveloperInterface- Parameters:
adTag- adTag- Returns:
trueif the ad has been shown- See Also:
-
AdPreferences.setAdTag(String)
-
isReady
Deprecated.This method is deprecated.Instead use
AdEventListenerin order to receive an event when the ad has been loaded.- Overrides:
isReadyin classcom.magnite.sdk.adsbase.Ad- Returns:
trueif the ad has been loaded.
-
enableConsent
@Deprecated public static void enableConsent(@NonNull android.content.Context context, boolean enabled) Deprecated.This method will be removed from future release of SDK 6.0.0 -
disableSplash
Deprecated.This method does nothing and it will be removed completely from future release of SDK 6.0.0
-