1

Im interested if there is a way to display more than one RewardVideoAd in a row. Before opening one videoAd it must be loaded, so I tried to load another videoAd when other is opened, so that way when the videoAd is closed/rewarded/completed it shows the new one. But it isn't working here is the code I have tried.

        (RewardedVideoAdEvent event, {String rewardType, int rewardAmount}) {
      print("RewardedVideoAd event $event");
      if (event == RewardedVideoAdEvent.opened) {
        setState(() {
          RewardedVideoAd.instance.load(
              adUnitId: RewardedVideoAd.testAdUnitId,
              targetingInfo: targetingInfo);
        });
      } else if (event == RewardedVideoAdEvent.closed ||
          event == RewardedVideoAdEvent.completed ||
          event == RewardedVideoAdEvent.rewarded ||
          event == RewardedVideoAdEvent.failedToLoad) {
        setState(() {
          _coins += rewardAmount;
          RewardedVideoAd.instance.show();
        });
      }
    };

..and the buttons from where the first ad is started.

                RaisedButton(
                  child: const Text('LOAD REWARDED VIDEO'),
                  onPressed: () {
                    RewardedVideoAd.instance.load(
                        adUnitId: RewardedVideoAd.testAdUnitId,
                        targetingInfo: targetingInfo);
                  },
                ),
                RaisedButton(
                  child: const Text('SHOW REWARDED VIDEO'),
                  onPressed: () {
                      RewardedVideoAd.instance.show();
                  },
                ),

I wonder if there is a way to show 2 or 3 rewardVideoAds in a row, one after another. Thanks!

Antoni Dobrenov
  • 162
  • 2
  • 9

0 Answers0