Hi, I am trying ads for the first time and I have some questions:
Is there something "wrong" in preloading every ad and then show/hide one or the other depending on screen requirement?
Once the ad is loaded do I need to reload it in order to update it?
Will this count as a new impression? (is there any advantage in having more impressions? )
Thank you
Comments
on game start load all needed ads, then show them when needed,
and once showed, load them again, so you would always have something to show
How should I handle v4vc content response if user turns off his connection while the game is running?
I am rewarding some powerups after a v4vc:
Since I am preloading my v4vc video, if internet is on I have Ads (it has been initialized, and maybe it has some content to show too) but if I turn off internet after the game is started I don't get any event upon calling showAd (nor the ad itself) - so my "reward function" keeps hanging on what to do.
I thought I could check internet connection by loading a known url before showing Ad, however it's not really fast to check everytime.
It would be better if I could check if Ads("v4vc", "rewarded") is true or false before trying to show it, is this possible?
Thank you
There are AD_DISPLAYED event to dispatch when ad is displayed and AD_DISMISSED when ad stopped showing.
Also for ads that support v4vc natively, like AdColony, etc, AD_ACTION_END will be dispatched when you actually need to reward user (for watching video whole video, etc)
Perhaps I'm missing something here. Is there a way to abort a failed/slow ad and return to Lua code after passing control to the ads plugin. It would be nice to have some timeout or similar.
I don't know exactly how Ads are managed, but since Ads seems to "know" if internet is down (banners stop showing instantly), could we get this info from it?
A method to check if an ad is true or not or Ads:isConnected() - return boolean -method would be enough.
@mertocan I did it, but the response time is a bit slow - at least with urlloader. It's not something we can check seamlessly in "real time".
Thank you very much
But about internet connection specifically, then on each load/showAd AdsInterface checks for internet connection automatically and dispatches AD_FAILED if there is no internet connection:
https://github.com/gideros/gideros/blob/master/plugins/ads/source/Android/src/com/giderosmobile/android/plugins/ads/Ads.java#L319-L324
That has worked for me and I have used it in my games
Implemented it after I think admob bug, where it would crash if there was no internet connection
Maybe it's my fault, but I get it if internet is available.
I used the plugin files in gideros 2015.09 installation directory, I will try taking them from github. Thanks again
I'll check my code. Many thanks.
But after checking code, I can see there is the same thing:
https://github.com/gideros/gideros/blob/master/plugins/ads/source/iOS/Plugins/Ads/AdsClass.mm#L78-L83
Maybe somthing is not working anymore, like for specific os version, etc?
Can you guys provide more details on devices you are testing it with?
I actually get one event, but not the one I was waiting for (from v4vc).
My preloading banners in the background are faster to fail than the v4vc, and somehow this prevents v4vc to cast its own events (banners are admob and v4vc is chartboost).
After the first banner AD_FAILED (due to wifi off) I don't get any event from v4vc - one should be dispatched when I ask to showAd("v4vc") instead I get nothing from it. However, I still get ad_failed events from the first banner anytime my updateloop tries to reload banners.
And I get the correct events from v4vc if I completely remove banners, so the syntax there is fine. :-B
Thank you