That was the whole point of having a generic ads.() system, so it would be the same, but it isn’t and it doesn’t support everything.
I guess without ads.() things would be 10x worse, it just seems like there are a few pieces that could easily adhere to that standard but don’t for whatever reason.
Thanks to ingmar for posting that fix, it really does help.
Also I am pleased to see the engineers are fixing the issue both with IOS and Android (come on android), you will make alot of people very happy.
And from me a thank you too Tom.
However, while this is good news can I ask why ads.loaded() is doing the same as ads.load() before the temp fix ?
Also if I query ads.loaded() do I get anything back ? a true or false to show its loaded?
(1) Where is the formal documentation?
http://docs.coronalabs.com/daily/plugin/ads-admob-v2/index.html
(2) Is ads.load() necessary for iOS? isn’t this just pre-load? Why is it necessary?
It shouldn’t be necessary. That was a bug that was fixed yesterday in the plugin. Now you can just call ads.show().
(3) In iOS, even I call ads.show() without ads.load, why is there no error (no callbacks)? It’s just plainly silent, which is also wrong!
There should be a call back. Can you be more specific?
(4) Even if ads.load() is called in iOS and the full-screen show successfully, why is there no more callback?
There should be a call back. Can you be more specific?
(5) Android can show the full-screen ad without ads.load & there is callback. Why does Android behave differently than iOS?
It shouldn’t be necessary. That was a bug that was fixed yesterday in the plugin. Now you can just call ads.show().
(6) Why can Corona consistently avoid answering these questions?
We’re busy bees with limited amounts of time.
I just conducted a test with a modified version of the AdMob v1 sample app converted to v2 and to use loading.
My listener call back gets called successfully when ad.load() completes. It also fires when the ad.show() for the banner completes as well. I did not get a call back for ad.show() in the interstitial presumably because it’s already loaded. I conducted the same test on my iPhone and got the same results.
Skipping ad.load() completely and only calling ad.show(), it works as expected on iOS and Android. I got a call back. It looks like the callbacks are working as I expect them too.
Rob
At least in my case it would be very useful to have the listener call back when ad.show() is called even if the ad has already been preloaded with ad.load(). I rely on that callback to know I’m showing an ad so I can trigger a scene transition, but I would still like to be able to preload an ad to get rid of the pesky delay waiting for the ad to load. Maybe I’m going crazy but I swear that was how it was already working on Android prior to last night.
At least in my case it would be very useful to have the listener call back when ad.show() is called even if the ad has already been preloaded with ad.load()
In your logic to show an ad you can call ads.isLoaded() to check if an ad is ready for display. If that function returns true an ad *will* be shown and you can trigger your scene transition.
The question is why it is designed this way?
-
When ads.load() is not called, there is callback
-
When ads.load() is called & ads.isLoaded() returns true, there will be no callback
If it is intended design for a reason, we will modify our code to tailor Corona design.
But what if it’s a bug or something that can be improved?
There is a callback for ads.load().
If you do not call ads.load() but call just ads.show() you get a call back.
The call back lets you know if the ad was downloaded and is available or not. If an ad was successfully fetched, you don’t need a call back to actually show it. Delivering ads is really three actions:
-
Fetch the ad.
-
Let you know if the fetch succeeded or not
-
if there was a fetched ad show it.
If you call ads.show() without ads.load(), it combines all three of these actions into one. For Interstitials, because it takes longer to download, the community wanted to separate the loading and showing process. The callback is tied to the loading part and not the actual display part.
.isLoaded() is a convenience function that lets you know if the ad was loaded outside of the callback function.
Rob