3

I followed instruction about the Rewarded Video Ads at https://developers.google.com/admob/android/rewarded-video and checked the google ad sample code https://github.com/googleads/googleads-mobile-android-examples/tree/master/admob/RewardedVideoExample There is no issue to load the ad.

What I can't figure out is that the RewardedVideoAdListener interface has one method

public void onRewarded(RewardItem rewardItem)

How can I pass my rewardItem to the ad listener? I checked the Google API https://developers.google.com/android/reference/com/google/android/gms/ads/reward/package-summary, there is no api for me to pass my reward item.

Or am I completely wrong? Is this RewardItem controlled by AdMob system? If such case, what value do I expect from the RewardItem interface?

https://developers.google.com/android/reference/com/google/android/gms/ads/reward/RewardItem

Nathan
  • 128
  • 3
  • 12

1 Answers1

0

what value do I expect from the RewardItem interface?

The default reward will have the amount of 1 and the type of "".
The test reward has the amount of 10 and the type of "coins".

How can I pass my rewardItem to the ad listener?

To pass the reward item one should create a rewarded video ad unit, where "Reward amount" and "Reward item" should be set. Here is the guide: https://support.google.com/admob/answer/7311747?hl=en .