Package org.prebid.mobile.api.rendering
Class RewardedAdUnit
java.lang.Object
org.prebid.mobile.api.rendering.BaseInterstitialAdUnit
org.prebid.mobile.api.rendering.RewardedAdUnit
Rewarded ad unit for rendering API.
-
Field Summary
Fields inherited from class org.prebid.mobile.api.rendering.BaseInterstitialAdUnit
config, controllerListener, userHasNotEarnedRewardYet -
Constructor Summary
ConstructorsConstructorDescriptionRewardedAdUnit(android.content.Context context, String configId) Constructor that creates the instance with aStandaloneRewardedVideoEventHandlerfor integration without any primary ad server.RewardedAdUnit(android.content.Context context, String configId, RewardedEventHandler eventHandler) Constructor that initializes a RewardedAdUnit with a custom event handler. -
Method Summary
Modifier and TypeMethodDescriptionvoiddestroy()Cleans up resources when destroyed.voidloadAd()Executes ad loading if no request is running.voidsetRewardedAdUnitListener(RewardedAdUnitListener userListener) Sets the listener for the rewarded ad events.Methods inherited from class org.prebid.mobile.api.rendering.BaseInterstitialAdUnit
changeInterstitialAdUnitState, getBidResponse, getContext, getImpOrtbConfig, getPbAdSlot, init, isBidInvalid, isLoaded, loadPrebidAd, notifyUserReward, setCloseButtonArea, setCloseButtonPosition, setImpOrtbConfig, setIsMuted, setIsSoundButtonVisible, setMaxVideoDuration, setPbAdSlot, setSkipButtonArea, setSkipButtonPosition, setSkipDelay, show
-
Constructor Details
-
RewardedAdUnit
Constructor that creates the instance with aStandaloneRewardedVideoEventHandlerfor integration without any primary ad server.- Parameters:
context- Android contextconfigId- 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 (useGamRewardedEventHandler)- Parameters:
context- the Android contextconfigId- the configuration id on Prebid ServereventHandler- 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:
loadAdin classBaseInterstitialAdUnit
-
destroy
public void destroy()Cleans up resources when destroyed. It has to be called if the ad unit is no longer needed.- Overrides:
destroyin classBaseInterstitialAdUnit
-
setRewardedAdUnitListener
Sets the listener for the rewarded ad events.
-