This class is deprecated.
Use FullScreenContentCallback
and OnUserEarnedRewardListener
.
A listener for receiving notifications during the lifecycle of a rewarded ad.
Constant Summary
int | ERROR_CODE_AD_REUSED | The rewarded ad has already been shown. |
int | ERROR_CODE_APP_NOT_FOREGROUND | The rewarded ad can not be shown when app is not in foreground. |
int | ERROR_CODE_INTERNAL_ERROR | Something happened internally. |
int | ERROR_CODE_MEDIATION_SHOW_ERROR | A mediation adapter failed to show the ad. |
int | ERROR_CODE_NOT_READY | The rewarded ad is not ready. |
Public Constructor Summary
Public Method Summary
void |
onRewardedAdClosed()
Called when a rewarded ad is closed.
|
void | |
void |
onRewardedAdFailedToShow(int errorCode)
This method is deprecated. Use
onRewardedAdFailedToShow(AdError) instead.
|
void |
onRewardedAdOpened()
Called when a rewarded ad opens a overlay that covers the screen.
|
abstract void |
Inherited Method Summary
Constants
public static final int ERROR_CODE_AD_REUSED
The rewarded ad has already been shown.
public static final int ERROR_CODE_APP_NOT_FOREGROUND
The rewarded ad can not be shown when app is not in foreground.
public static final int ERROR_CODE_INTERNAL_ERROR
Something happened internally.
public static final int ERROR_CODE_MEDIATION_SHOW_ERROR
A mediation adapter failed to show the ad. If this error is returned from
AdError.getCode()
,
check AdError.getCause()
for the underlying cause.
public static final int ERROR_CODE_NOT_READY
The rewarded ad is not ready.
Public Constructors
public RewardedAdCallback ()
Public Methods
public void onRewardedAdClosed ()
Called when a rewarded ad is closed.
public void onRewardedAdFailedToShow (AdError adError)
Called when a rewarded ad failed to show.
Parameters
adError | AdError
detailing the cause of the failure. AdError.getCode()
is one of the error code constants defined in RewardedAdCallback . |
---|
public void onRewardedAdFailedToShow (int errorCode)
This method is deprecated.
Use
onRewardedAdFailedToShow(AdError)
instead.
Called when a rewarded ad failed to show. The error code is one of the error code
constants defined in RewardedAdCallback
.
public void onRewardedAdOpened ()
Called when a rewarded ad opens a overlay that covers the screen.
public abstract void onUserEarnedReward (RewardItem reward)
Called when a rewarded ad triggers a reward. The app is responsible for crediting the user with the reward.
Parameters
reward | the reward to grant the user. This value will never be null. If the ad does not
specify a reward amount and no override is provided for this ad unit on the Admob
UI, the default reward (RewardItem.DEFAULT_REWARD )
will have an amount of 1 and a type of "" . |
---|