0

There are rewarded ads in my Android app. There is a server-side verification (SSV) callback set up. Everything is working if the user has a stable network connection: ads are showing, the callback is called, the user gets a reward. However, if the user's internet is unstable, the following happens - I can reproduce it on my own device if I'm quick with the "flight mode" button:

  1. The user has a working internet connection.
  2. The app loads the ad, initializes it, waiting to show.
  3. The user clicks on the "get reward" button. The ad starts to play. All is well so far.
  4. The user's connection goes offline briefly.
  5. The ad finishes to play, the OnUserEarnedRewardListener::onUserEarnedReward callback is called, the user gets the reward.
  6. The user's connection is restored.
  7. The SSV callback on my server is never called after that. The reward therefore can never be validated and it seems to my server as if the user did something fraudulent.

I was following this instruction: https://developers.google.com/admob/android/rewarded?hl=en-US. My code to set the SSV parameters in the app:

​ServerSideVerificationOptions options = new ServerSideVerificationOptions
.Builder()
.setCustomData(customData)
.setUserId(userId)
.build();
mRewardedAd.setServerSideVerificationOptions(options);

The logs that I added to every step show that the impression has been recorded. The logs in the app are exactly the same as if the user had been online all the time; so I doubt if there is a problem with my implementation - although, of course, it is possible.

It seems like a bug to me that admob doesn't send the SSV callback in such a case. Is there no retry in the android admob library to retry whatever it does if the user is briefly offline?

How can I deal with this problem and get the SSV callbacks even if the user's internet connection is patchy?

Thank you in advance for your reply!

0 Answers0