public final class RewardedAd
extends com.yandex.mobile.ads.fullscreen.FullScreenAd
| Constructor and Description |
|---|
RewardedAd(android.content.Context context)
Constructs a new
RewardedAd programmatically. |
| Modifier and Type | Method and Description |
|---|---|
void |
destroy()
Destroys this
RewardedAd entirely and cleans up resources. |
boolean |
isLoaded()
Returns
true if this rewarded ad has been successfully loaded
and is ready to be shown, otherwise false. |
void |
loadAd(AdRequest adRequest)
Starts loading the ad by
AdRequest on a background thread. |
void |
setBlockId(java.lang.String blockId)
Sets a block id.
|
void |
setRewardedAdEventListener(RewardedAdEventListener rewardedAdEventListener)
Sets an
RewardedAdEventListener. |
void |
show()
Shows the rewarded ad, only if it has been loaded.
|
public RewardedAd(@NonNull
android.content.Context context)
RewardedAd programmatically.context - The activity context the view is running in, through which it can
access the current theme, resources, etc. In particular, it
uses the window manager and theme in this context to present its UI.public void loadAd(@NonNull
AdRequest adRequest)
AdRequest on a background thread.
NOTE: The block id must be set before that.adRequest - AdRequestpublic boolean isLoaded()
true if this rewarded ad has been successfully loaded
and is ready to be shown, otherwise false.true if this rewarded ad has been successfully
loaded and is ready to be shown.public void setBlockId(@NonNull
java.lang.String blockId)
blockId - Unique ad placement ID created at partner interface.public void setRewardedAdEventListener(@Nullable
RewardedAdEventListener rewardedAdEventListener)
RewardedAdEventListener.rewardedAdEventListener - RewardedAdEventListener.public void show()
public void destroy()
RewardedAd entirely and cleans up resources.
NOTE: Don't work with this RewardedAd thereafter.