MoPubRewardedAdListener /5.16.0
public interface MoPubRewardedAdListener
Listener for rewarded ad events. Implementers of this interface will receive events for all rewarded ad units in the app.
Public Methods
public void /onRewardedAdClicked(String adUnitId) /+5.16.0
-
Description: Called when a rewarded ad is clicked.
-
Parameters:
adUnitId
: A String containing the current ad unit ID associated with this callback
public void /onRewardedAdClosed(String adUnitId) /+5.16.0
-
Description: Called when a rewarded ad is closed. At this point your application should resume.
-
Parameters:
adUnitId
: A String containing the current ad unit ID associated with this callback
public void /onRewardedAdCompleted(Set<String> adUnitIds, MoPubReward reward) /+5.16.0
-
Description: Called when a rewarded ad is completed and the user should be rewarded.
-
Parameters:
adUnitIds
: A String containing the current ad unit ID associated with this callbackreward
: The reward object associated with the current video
public void /onRewardedAdLoadFailure(String adUnitId, MoPubErrorCode errorCode) /+5.16.0
-
Description: Called when a video fails to load for the given ad unit id. The provided error code will give more insight into the reason for the failure to load.
-
Parameters:
adUnitId
: A String containing the current ad unit ID associated with this callbackerrorCode
: An error code selected by the MoPub SDK or mediation adapters for the failurse to load the current rewarded ad
public void /onRewardedAdLoadSuccess(String adUnitId) /+5.16.0
-
Description: Called when the
adUnitId
has loaded. At this point you should be able to callMoPubRewardedAds.showRewardedAd(String adUnitId)
to show the video. -
Parameters:
adUnitId
: A String containing the current ad unit ID associated with this callback
public void /onRewardedAdShowError(String adUnitId, MoPubErrorCode errorCode) /+5.16.0
-
Description: Called when there is an error during video playback.
-
Parameters:
adUnitId
: A String containing the current ad unit ID associated with this callbackerrorCode
: An error code selected by the MoPub SDK or mediation adapters for the failurse to load the current rewarded ad
public void /onRewardedAdStarted(String adUnitId) /+5.16.0
-
Description: Called when a rewarded ad starts playing.
-
Parameters:
adUnitId
: A String containing the current ad unit ID associated with this callback
Last updated February 16, 2021
TWITTER, MOPUB, and the Bird logo are trademarks of Twitter, Inc. or its affiliates. All third party logos and trademarks included are the property of their respective owners.
© 2021 MoPub (a division of Twitter, Inc.)