Package org.prebid.mobile.api.rendering
Class RewardedAdUnit
-
- All Implemented Interfaces:
public class RewardedAdUnit extends BaseInterstitialAdUnit
Rewarded ad unit for rendering API.
-
-
Field Summary
Fields Modifier and Type Field Description public BidResponsebidResponse
-
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.
-
Method Summary
Modifier and Type Method Description voidloadAd()Executes ad loading if no request is running. voiddestroy()Cleans up resources when destroyed. voidsetRewardedAdUnitListener(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 contextconfigId- 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 contextconfigId- the configuration id on Prebid ServereventHandler- 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.
-
setRewardedAdUnitListener
void setRewardedAdUnitListener(RewardedAdUnitListener userListener)
Sets the listener for the rewarded ad events.
-
-
-
-