Saturday, 5 October 2019

RewardedVideoAd callback listener mismatch

I have implemented RewardedVideoAd for use of PRO features.

When I am using RewardedVideoAd 1 time(in a single screen) in the whole app then it works perfectly. but when I use multiple times (in multiple screens) then RewardedVideoAd callback listener is a mismatch between both screens.

let me explain the whole scenario

  1. I have open SCREEN-A then I have watched RewardedVideoAd. after successfully completing this video I got reward.
  2. now I am going to next SCREEN-B.
  3. then, I am going to next SCREEN-C with SCREEN-B finish.
  4. so, now app status is in foreground state SCREEN-C & in background state SCREEN-A.
  5. now I am watching RewardedVideoAd in SCREEN-C. after successfully completing this video I got reward.
  6. then I have closed SCREEN-C. so, I redirect to SCREEN-A which is in the background state.
  7. now I am watching RewardedVideoAd in SCREEN-A. After successfully completing this video. I did not get a reward.

so the issue is that last time I have watched a video in SCREEN-C. so all the callbacks are going to SCREEN-C, not in SCREEN-A.

I have also implemented the below code in all screens.

@Override
public void onResume() {
    mRewardedVideoAd.resume(this);
    super.onResume();
}

@Override
public void onPause() {
    mRewardedVideoAd.pause(this);
    super.onPause();
}

@Override
public void onDestroy() {
    mRewardedVideoAd.destroy(this);
    super.onDestroy();
}


from RewardedVideoAd callback listener mismatch

No comments:

Post a Comment