Package com.startapp.sdk.adsbase
Class StartAppAd
java.lang.Object
com.startapp.sdk.adsbase.Ad
com.startapp.sdk.adsbase.StartAppAd
- All Implemented Interfaces:
com.startapp.sdk.adsbase.DeveloperInterface,Serializable
public class StartAppAd
extends com.startapp.sdk.adsbase.Ad
implements com.startapp.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.
- See Also:
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic enumRepresents different kinds of ad contentNested classes/interfaces inherited from class com.startapp.sdk.adsbase.Ad
com.startapp.sdk.adsbase.Ad.AdState, com.startapp.sdk.adsbase.Ad.AdType -
Field Summary
Fields inherited from class com.startapp.sdk.adsbase.Ad
activityExtra, adCacheTtl, belowMinCPM, consentData, context, errorMessage, extraData, placement -
Constructor Summary
ConstructorsConstructorDescriptionStartAppAd(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.booleanisReady()Deprecated.voidload(com.startapp.sdk.adsbase.model.AdPreferences adPreferences, AdEventListener callback) Deprecated.voidloadAd()Alias forloadAd(AdMode.AUTOMATIC, new AdPreferences(), null);voidloadAd(AdEventListener listener) Alias forloadAd(AdMode.AUTOMATIC, new AdPreferences(), listener);voidloadAd(com.startapp.sdk.adsbase.model.AdPreferences adPreferences) Alias forloadAd(AdMode.AUTOMATIC, adPreferences, null);voidloadAd(com.startapp.sdk.adsbase.model.AdPreferences adPreferences, AdEventListener listener) Alias forloadAd(AdMode.AUTOMATIC, adPreferences, listener);voidloadAd(StartAppAd.AdMode adMode) Alias forloadAd(adMode, new AdPreferences(), null);voidloadAd(StartAppAd.AdMode adMode, AdEventListener listener) Alias forloadAd(adMode, new AdPreferences(), listener);voidloadAd(StartAppAd.AdMode adMode, com.startapp.sdk.adsbase.model.AdPreferences adPreferences) Alias forloadAd(adMode, adPreferences, null);voidloadAd(StartAppAd.AdMode adMode, com.startapp.sdk.adsbase.model.AdPreferences adPreferences, AdEventListener listener) Loads ad according to theadModeandadPreferencesgiven.protected voidloadAds(com.startapp.sdk.adsbase.model.AdPreferences adPreferences, AdEventListener callback) Deprecated.static voidsetReturnAdsPreferences(com.startapp.sdk.adsbase.model.AdPreferences adPreferences) This method does nothing and it will be removed completely from future release of SDK 6.0.0voidsetVideoListener(VideoListener listener) Sets a listener for video ad events.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.static voidshowSplash(android.app.Activity activity, android.os.Bundle savedInstanceState) Deprecated.static voidshowSplash(android.app.Activity activity, android.os.Bundle savedInstanceState, com.startapp.sdk.ads.splash.SplashConfig configuration) Deprecated.static voidshowSplash(android.app.Activity activity, android.os.Bundle savedInstanceState, com.startapp.sdk.ads.splash.SplashConfig configuration, com.startapp.sdk.adsbase.model.AdPreferences adPreferences) Deprecated.static voidshowSplash(android.app.Activity activity, android.os.Bundle savedInstanceState, com.startapp.sdk.ads.splash.SplashConfig configuration, com.startapp.sdk.adsbase.model.AdPreferences adPreferences, com.startapp.sdk.ads.splash.SplashHideListener splashHideListener) Deprecated.static voidshowSplash(android.app.Activity activity, android.os.Bundle savedInstanceState, com.startapp.sdk.adsbase.model.AdPreferences adPreferences) Deprecated.Methods inherited from class com.startapp.sdk.adsbase.Ad
canShowAd, getAdCacheTtl, getAdId, getAdInfoOverride, getBidToken, getConsentData, getContext, getDParam, getErrorMessage, getExtraData, getFallbackAdCacheTtl, getLastLoadTime, getNotDisplayedReason, getPlacement, getRequestUrl, getState, getType, getVideoCancelCallBack, hasAdCacheTtlPassed, isBelowMinCPM, load, load, load, load, setActivityExtra, setAdInfoOverride, setContext, setErrorMessage, setExtraData, setNotDisplayedReason, setPlacement, setRequestUrl, setState, setVideoCancelCallBackMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface com.startapp.sdk.adsbase.DeveloperInterface
close, onBackPressed, onPause, onRestoreInstanceState, onResume, onSaveInstanceState
-
Constructor Details
-
StartAppAd
public StartAppAd(@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 -
load
@Deprecated public void load(com.startapp.sdk.adsbase.model.AdPreferences adPreferences, AdEventListener callback) Deprecated.- Overrides:
loadin classcom.startapp.sdk.adsbase.Ad- See Also:
-
loadAds
@Deprecated protected void loadAds(com.startapp.sdk.adsbase.model.AdPreferences adPreferences, AdEventListener callback) Deprecated.This methods does nothing.- Specified by:
loadAdsin classcom.startapp.sdk.adsbase.Ad
-
loadAd
public void loadAd()Alias forloadAd(AdMode.AUTOMATIC, new AdPreferences(), null);- Specified by:
loadAdin interfacecom.startapp.sdk.adsbase.DeveloperInterface- See Also:
-
loadAd
public void loadAd(@NonNull com.startapp.sdk.adsbase.model.AdPreferences adPreferences) Alias forloadAd(AdMode.AUTOMATIC, adPreferences, null);- Specified by:
loadAdin interfacecom.startapp.sdk.adsbase.DeveloperInterface- See Also:
-
loadAd
Alias forloadAd(AdMode.AUTOMATIC, new AdPreferences(), listener);- Specified by:
loadAdin interfacecom.startapp.sdk.adsbase.DeveloperInterface- See Also:
-
loadAd
public void loadAd(@NonNull com.startapp.sdk.adsbase.model.AdPreferences adPreferences, @NonNull AdEventListener listener) Alias forloadAd(AdMode.AUTOMATIC, adPreferences, listener);- Specified by:
loadAdin interfacecom.startapp.sdk.adsbase.DeveloperInterface- See Also:
-
loadAd
Alias forloadAd(adMode, new AdPreferences(), null);- Specified by:
loadAdin interfacecom.startapp.sdk.adsbase.DeveloperInterface- See Also:
-
loadAd
public void loadAd(@NonNull StartAppAd.AdMode adMode, @NonNull com.startapp.sdk.adsbase.model.AdPreferences adPreferences) Alias forloadAd(adMode, adPreferences, null);- Specified by:
loadAdin interfacecom.startapp.sdk.adsbase.DeveloperInterface- See Also:
-
loadAd
Alias forloadAd(adMode, new AdPreferences(), listener);- Specified by:
loadAdin interfacecom.startapp.sdk.adsbase.DeveloperInterface- See Also:
-
loadAd
public void loadAd(@NonNull StartAppAd.AdMode adMode, @Nullable com.startapp.sdk.adsbase.model.AdPreferences adPreferences, @Nullable AdEventListener listener) Loads ad according to theadModeandadPreferencesgiven.- Specified by:
loadAdin interfacecom.startapp.sdk.adsbase.DeveloperInterface- Parameters:
adMode- one ofStartAppAd.AdMode.AUTOMATIC,StartAppAd.AdMode.FULLPAGE,StartAppAd.AdMode.VIDEOorStartAppAd.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.startapp.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 intoloadAd(AdMode, AdPreferences, AdEventListener)- Specified by:
showAdin interfacecom.startapp.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.startapp.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 intoloadAd(AdMode, AdPreferences, AdEventListener)- Specified by:
showAdin interfacecom.startapp.sdk.adsbase.DeveloperInterface- Parameters:
adTag- adTag- Returns:
trueif the ad has been shown- See Also:
-
AdPreferences.setAdTag(String)
-
setVideoListener
Sets a listener for video ad events.- Specified by:
setVideoListenerin interfacecom.startapp.sdk.adsbase.DeveloperInterface- Parameters:
listener- listener
-
isReady
Deprecated.This method is deprecated.Instead use
AdEventListenerin order to receive an event when the ad has been loaded.- Overrides:
isReadyin classcom.startapp.sdk.adsbase.Ad- Returns:
trueif the ad has been loaded.
-
setReturnAdsPreferences
public static void setReturnAdsPreferences(@Nullable com.startapp.sdk.adsbase.model.AdPreferences adPreferences) This method does nothing and it will be removed completely from future release of SDK 6.0.0 -
showSplash
@Deprecated public static void showSplash(android.app.Activity activity, android.os.Bundle savedInstanceState) Deprecated.This method does nothing and it will be removed completely from future release of SDK 6.0.0 -
showSplash
@Deprecated public static void showSplash(android.app.Activity activity, android.os.Bundle savedInstanceState, com.startapp.sdk.ads.splash.SplashConfig configuration) Deprecated.This method does nothing and it will be removed completely from future release of SDK 6.0.0 -
showSplash
@Deprecated public static void showSplash(android.app.Activity activity, android.os.Bundle savedInstanceState, com.startapp.sdk.adsbase.model.AdPreferences adPreferences) Deprecated.This method does nothing and it will be removed completely from future release of SDK 6.0.0 -
showSplash
@Deprecated public static void showSplash(android.app.Activity activity, android.os.Bundle savedInstanceState, com.startapp.sdk.ads.splash.SplashConfig configuration, com.startapp.sdk.adsbase.model.AdPreferences adPreferences) Deprecated.This method does nothing and it will be removed completely from future release of SDK 6.0.0 -
showSplash
@Deprecated public static void showSplash(android.app.Activity activity, android.os.Bundle savedInstanceState, com.startapp.sdk.ads.splash.SplashConfig configuration, com.startapp.sdk.adsbase.model.AdPreferences adPreferences, com.startapp.sdk.ads.splash.SplashHideListener splashHideListener) Deprecated.This method does nothing and it will be removed completely from future release of SDK 6.0.0
-