Callback order in Unity Editor vs Device

111 views
Skip to first unread message

Dylan Bevis

unread,
Mar 6, 2022, 7:34:41 PM3/6/22
to Google Mobile Ads SDK Developers
Hi,

I've noticed that when using AdMob in the Unity Editor, I get the OnAdClosed callback before the OnUserEarnedReward callback. They both happen as the Ad window closes.

However on device the OnUserEarnedReward callback happens once the user gets to the end of the ad, and then OnAdClosed happens when the ad window closes. So is always in the opposite order.

Is the intention that OnUserEarnedReward will always trigger before OnAdClosed (assuming the user actual finishes the ad to get the reward) or do you need to support them triggering in either order?

I'm using: Google Mobile Ads Unity Plugin - Version 6.0.0

Thanks,
Dylan

Mobile Ads SDK Forum Advisor

unread,
Mar 7, 2022, 9:37:20 AM3/7/22
to dy...@featherweightgames.com, google-adm...@googlegroups.com

Hi Dylan,

Thank you for reaching out to us.

For SDK perspective, once the video ads time are completed, then the rewards may earn. You may check also this implementation for guide.

Regards,

Google Logo
Princess Pamela
Mobile Ads SDK Team
 


ref:_00D1U1174p._5004Q2Xlyoh:ref

Dylan Bevis

unread,
Mar 7, 2022, 10:39:42 PM3/7/22
to Mobile Ads SDK Forum Advisor, google-adm...@googlegroups.com
Hi,

Sorry I don't think this quite answered my question.

Is it possible that OnUserEarnedReward will be triggered after the user has closed the Ad?

Thanks,
Dylan


Mobile Ads SDK Forum Advisor

unread,
Mar 8, 2022, 10:09:04 AM3/8/22
to dy...@featherweightgames.com, google-adm...@googlegroups.com

Hi Dylan,

Thank you for your response.

With regard to your question, yes, it is possible as the reward are being called once the video ads are done playing. In addition to that, you may check this policy for rewarded ads to know more about it.

Mobile Ads SDK Forum Advisor

unread,
Mar 9, 2022, 3:40:29 PM3/9/22
to dy...@featherweightgames.com, google-adm...@googlegroups.com
Hi Dylan,

I work with Pamela. You are asking for a guarantee that in case a user earned a reward the reward callback will occur before the ad closed callback. Our documentation doesn't promise this support. Let me bring this up with my team. We will get back to you as soon as possible.

Regards,

Google Logo
Aryeh
Mobile Ads SDK Team
 


ref:_00D1U1174p._5004Q2Xlyoh:ref

Dylan Bevis

unread,
Mar 9, 2022, 4:04:19 PM3/9/22
to Mobile Ads SDK Forum Advisor, google-adm...@googlegroups.com
Hi Aryeh,

Thanks for that.

For extra context, the reason I’d like to be able guarantee the order is because when showing user feedback for getting a reward - If that happens on the reward callback the ad view is still showing over the top so the user doesn’t see it. I’d like to delay the feedback until after the ad closes, however if you can’t guarantee that reward will call first this gets more complicated than it should be.

Thanks,
Dylan

Mobile Ads SDK Forum Advisor

unread,
Mar 10, 2022, 8:06:12 PM3/10/22
to dy...@featherweightgames.com, google-adm...@googlegroups.com

Hi Dylan,

 

My name is Nick. Aryeh is correct, we do not guarantee the callback order for `OnUserEarnedReward` and `OnAdClosed`. This callback order can be determined by mediation partners and may be out of our control.

 

Thanks,

Nick



ref:_00D1U1174p._5004Q2Xlyoh:ref

Dylan Bevis

unread,
Mar 10, 2022, 8:38:58 PM3/10/22
to Mobile Ads SDK Forum Advisor, google-adm...@googlegroups.com
Thanks for confirming, I will write my own work around then.

Ayyappa J

unread,
Sep 18, 2024, 1:29:44 AMSep 18
to Google Mobile Ads SDK Developers
This is so bad. You guys can define the spec to call in a specific order. 
If the user watches the ad till a certain point, you know he can be rewarded. So ideally, before close action is done, the user rewarded or not can be determined. The same can be imposed in the mediation adapters spec for a better DX!

Mobile Ads SDK Forum Advisor

unread,
Sep 18, 2024, 12:53:41 PMSep 18
to ayyap...@gmail.com, google-adm...@googlegroups.com
Thanks for the feedback,

I will give this feedback to our mediation team.
 
This message is in relation to case "ref:!00D1U01174p.!5004Q02Xlyoh:ref" (ADR-00096548)

Thanks,
 
Google Logo
Nicholas Ventimiglia
Mobile Ads SDK Team


Mobile Ads SDK Forum Advisor

unread,
Sep 30, 2024, 2:09:12 PM (10 days ago) Sep 30
to google-adm...@googlegroups.com, ayyap...@gmail.com
Hi Ayyappa,

Can you inform me on what platform (ios / android) and adapter version you are using? This will help us find and fix the issue.

Ayyappa J

unread,
Oct 1, 2024, 7:42:38 AM (9 days ago) Oct 1
to Mobile Ads SDK Forum Advisor, google-adm...@googlegroups.com
Sure!
I'm not using mediation and the behaviour was observed in AdMob unity sdk version(9.0.0) only on editor.

I was surprised that the ordering was not imposed/forced on to the adapter implementations as this just creates confusion about what to expect.
Anyways, I would love to see a proper concrete ordering and thanks for getting back to me on this. I see some hope now :)

Cheers,
Ayyappa

Mobile Ads SDK Forum Advisor

unread,
Oct 3, 2024, 1:31:30 PM (7 days ago) Oct 3
to ayyap...@gmail.com, google-adm...@googlegroups.com
Hi,

Thanks for the update! I will pass this along to engineering.

Rashid Ali

unread,
Oct 8, 2024, 5:12:13 AM (2 days ago) Oct 8
to Google Mobile Ads SDK Developers
Reply all
Reply to author
Forward
0 new messages