So there are a few ways to set up AdMob listeners through SDKBox as described in the official Cocos Creator Documentation.
While I’ve had no problem integrating actual ads into my Android Application, I’m having a ton of trouble navigating through the Listeners and figuring out how they work. The available listeners are:
adViewDidReceiveAd(name)
adViewDidFailToReceiveAdWithError(name, msg)
adViewWillPresentScreen(name)
adViewDidDismissScreen(name)
adViewWillDismissScreen(name)
adViewWillLeaveApplication(name)
Here are my problems:
What do each of these listeners do exactly? I found an explanation on the Google Ads Developer Blogs which answers that question to an extent. But I didn’t find it completely clear, especially since I’m using the iOS callbacks for some reason while developing for Android and they don’t really tell you the difference between WillDismissScreen() and DidDismissScreen() except that the first is called before the ad is closed and the second after the ad is closed.
I’m calling a rewarded video ad, and as of natural consequence, I want the user to watch through the entire video before they can get their reward. However, (I) the user gets the reward whether or not they have watched through the entire rewarded video and that’s probably because I’m giving them the rewards in WillPresentScreen(). But, (II) which listener should I use if I want to determine whether or not they have watched through the entire ad? Is it DidDismissScreen() or WillDismissScreen()?
But it seems that it is mostly a reward mechanism more than anything to check whether the rewarded video is fully watched or not.
I just tried it in my project and it doesn’t seem to be a listener of any sort which gets called in certain conditions?
Perhaps I’ll have to configure the callback through the AdMob dashboard for it to work, but as of right now, it’s not really triggering any listeners or even executing the extra code placed inside the listener function for that matter.