Admob Pro - reward video multiple times


#1

I am trying to to embed reward videos using the admob Pro plugin (unfortunately the author closed down the issues page on his plugin o.O).

I can correctly display reward videos and handle the result.
However, once a video was shown, I cannot show another video until the app is closed (not suspended!) and restarted.

My workflow:

  1. Prepare video
  2. Wait for video loaded event
  3. Show button to user which offers video with reward
  4. User clicks button
  5. Video is shown
  6. Video is completed, closed and action is done
  7. (Optional, tried also without 7+8): Call prepare video again, to load next video
  8. (Optional, tried also without 7+8): Waiting for video loaded event again
  9. Show button to user which offers again video with reward
  10. User clicks button
  11. Nothing happens.

The video loaded event is correctly received for the 2nd video, but the call to “showRewardVideo()” does not do anything. No exception (also not in system log).
Also, no event for a failing ad load is triggered.

Any ideas? Is this a bug in the plugin which prevents showing another video?
Hint: Testing this on Android device.


#2

Ok I found the issue:
It is needed to re-prepare for the next video (steps 7+8 above). But you cannot do so within the callback when you receive the event that the ad was shown completely, because at that time still the old ad is displayed. Calling prepare while the old video is still shown will result in no error but above behaviour. I tried calling it in a setTimeout, when the interval was long enough that I clicked the close button on the shown video before it executed, it worked. So I have to find a way to prepare the next video once the old has been shown AND the user has closed the video.

edit:
So I ended up doing following:
I added an onAdDismiss() subscription, which gets called when the user closes the video ad dialog. In this subscription handler I trigger the prepareRewardVideo… method again. Now it works as expected.