Class BaseInterstitialAdUnit

java.lang.Object
org.prebid.mobile.api.rendering.BaseInterstitialAdUnit
Direct Known Subclasses:
InterstitialAdUnit, RewardedAdUnit

public abstract class BaseInterstitialAdUnit extends Object
Internal base interstitial ad unit for rendering API.
  • Field Details

    • userHasNotEarnedRewardYet

      protected boolean userHasNotEarnedRewardYet
    • config

      protected AdUnitConfiguration config
    • controllerListener

      protected final InterstitialControllerListener controllerListener
  • Constructor Details

    • BaseInterstitialAdUnit

      protected BaseInterstitialAdUnit(android.content.Context context)
  • Method Details

    • loadAd

      public void loadAd()
      Executes ad loading if no request is running.
    • isLoaded

      public boolean isLoaded()
      Returns:
      true if auction winner was defined, false otherwise
    • show

      public void show()
      Executes interstitial display if auction winner is defined.
    • getImpOrtbConfig

      public String getImpOrtbConfig()
    • setImpOrtbConfig

      public void setImpOrtbConfig(String ortbConfig)
      Sets imp level OpenRTB config JSON string that will be merged with the original imp object in the bid request. Expected format: "{"new_field": "value"}".
      Parameters:
      ortbConfig - JSON config string.
    • getPbAdSlot

      public String getPbAdSlot()
    • setPbAdSlot

      public void setPbAdSlot(String adSlot)
    • setSkipDelay

      public void setSkipDelay(int secondsDelay)
      Sets delay in seconds to show skip or close button.
    • setSkipButtonArea

      public void setSkipButtonArea(double buttonArea)
      Sets skip button percentage size in range from 0.05 to 1. If value less than 0.05, size will be default.
    • setSkipButtonPosition

      public void setSkipButtonPosition(Position skipButtonPosition)
      Sets skip button position on the screen. Suitable values TOP_LEFT and TOP_RIGHT. Default value TOP_RIGHT.
    • setIsMuted

      public void setIsMuted(boolean isMuted)
    • setIsSoundButtonVisible

      public void setIsSoundButtonVisible(boolean isSoundButtonVisible)
    • setMaxVideoDuration

      public void setMaxVideoDuration(int seconds)
    • setCloseButtonArea

      public void setCloseButtonArea(double closeButtonArea)
      Sets close button percentage size in range from 0.05 to 1. If value less than 0.05, size will be default.
    • setCloseButtonPosition

      public void setCloseButtonPosition(Position closeButtonPosition)
      Sets close button position on the screen. Suitable values TOP_LEFT and TOP_RIGHT. Default value TOP_RIGHT.
    • destroy

      public void destroy()
      Cleans up resources when destroyed.
    • init

      protected void init(AdUnitConfiguration adUnitConfiguration)
    • loadPrebidAd

      protected void loadPrebidAd()
    • getContext

      protected android.content.Context getContext()
    • isBidInvalid

      protected boolean isBidInvalid()
    • changeInterstitialAdUnitState

      protected void changeInterstitialAdUnitState(org.prebid.mobile.api.rendering.BaseInterstitialAdUnit.InterstitialAdUnitState state)
    • getBidResponse

      public BidResponse getBidResponse()
    • notifyUserReward

      protected void notifyUserReward()