Class RewardedAdUnit

    • Nested Class Summary

      Nested Classes 
      Modifier and Type Class Description
    • Field Summary

      Fields 
      Modifier and Type Field Description
      public BidResponse bidResponse
    • Constructor Summary

      Constructors 
      Constructor Description
      RewardedAdUnit(Context context, String configId) Constructor that creates the instance with a StandaloneRewardedVideoEventHandler for integration without any primary ad server.
      RewardedAdUnit(Context context, String configId, RewardedEventHandler eventHandler) Constructor that initializes a RewardedAdUnit with a custom event handler.
    • Enum Constant Summary

      Enum Constants 
      Enum Constant Description
    • Method Summary

      Modifier and Type Method Description
      void loadAd() Executes ad loading if no request is running.
      void destroy() Cleans up resources when destroyed.
      void setRewardedAdUnitListener(RewardedAdUnitListener userListener) Sets the listener for the rewarded ad events.
      • Methods inherited from class org.prebid.mobile.api.rendering.BaseInterstitialAdUnit

        getBidResponse, getGlobalOrtbConfig, getImpOrtbConfig, getPbAdSlot, isLoaded, setCloseButtonArea, setCloseButtonPosition, setGlobalOrtbConfig, setImpOrtbConfig, setIsMuted, setIsSoundButtonVisible, setMaxVideoDuration, setPbAdSlot, setSkipButtonArea, setSkipButtonPosition, setSkipDelay, show
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • RewardedAdUnit

        RewardedAdUnit(Context context, String configId)

        Constructor that creates the instance with a StandaloneRewardedVideoEventHandler for integration without any primary ad server.

        Parameters:
        context - Android context
        configId - configuration id for on Prebid Server
      • RewardedAdUnit

        RewardedAdUnit(Context context, String configId, RewardedEventHandler eventHandler)

        Constructor that initializes a RewardedAdUnit with a custom event handler. It supports GAM integration (use GamRewardedEventHandler)

        Parameters:
        context - the Android context
        configId - the configuration id on Prebid Server
        eventHandler - the event handler for primary ad server responsible for managing rewarded ad
    • Method Detail

      • loadAd

         void loadAd()

        Executes ad loading if no request is running.

      • destroy

         void destroy()

        Cleans up resources when destroyed. It has to be called if the ad unit is no longer needed.