Closed chinloyal closed 1 year ago
@chinloyal Can you describe more clearly how it doesn't work? From my end, I can see the reward info from callback after ads is shown:
I/flutter (14306): Reward: 10 - coins
Using sample code at https://github.com/googleads/googleads-mobile-flutter/tree/main/packages/google_mobile_ads/example and update snippet code as below:
@huycozy Yes the onUserEarnedReward
callback gets fired but my firebase cloud function is not being triggered to verify the ad view.
You can see below I've verified that it works on the admob portal:
Also for more context I reward the users using the firebase function in firestore not from the client. But that firebase function is no longer being triggered when I call setServerSideOptions
, and so the user doesn't receive a reward after watching the ad
I've figured out why it's not working. In debug mode I was using the testRewardAdUnitId, instead of the production one. I tested using the production id, and it worked.
I've upgraded to the latest version of this plugin (v2.3.0) and used the new
setServerSideOptions
setter, it does not seem to be triggering my cloud function for verifying rewards, it worked before on versions that didn't havesetServerSideOptions
.I've also tried v2.1.0 none of them work.
This is the snippet of me trying to do so:
Also there is no documentation on how to do this on the official docs https://developers.google.com/admob/flutter/quick-start. There's mo SSV section under advanced topics like for the Android/iOS SDKs
Flutter doctor: