Class RewardedAdUnit

java.lang.Object
org.prebid.mobile.api.rendering.BaseInterstitialAdUnit
org.prebid.mobile.api.rendering.RewardedAdUnit

public class RewardedAdUnit extends BaseInterstitialAdUnit
Rewarded ad unit for rendering API.
  • Constructor Details

    • RewardedAdUnit

      public RewardedAdUnit(android.content.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

      public RewardedAdUnit(android.content.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 Details

    • loadAd

      public void loadAd()
      Executes ad loading if no request is running.
      Overrides:
      loadAd in class BaseInterstitialAdUnit
    • destroy

      public void destroy()
      Cleans up resources when destroyed. It has to be called if the ad unit is no longer needed.
      Overrides:
      destroy in class BaseInterstitialAdUnit
    • setRewardedAdUnitListener

      public void setRewardedAdUnitListener(RewardedAdUnitListener userListener)
      Sets the listener for the rewarded ad events.