I finished a game and want to publish it but I've noticed a problem and I am blocked.
I can't find the error. And I think that should be the Ads interface.
I use box2d and Ads interface (Chartboost/Heyzap for interstitial & iAd/admob for banner).
If the device is connected (to the Internet) everything is fine, but the problem is that if there is no connection then the game it's running with very stuck performance. Seems it's trying to connect in every frame.
If you do not use the Interface Ads all goes well.
Please
@ar2rsawseen might you do a check asap?
I need to publish it this weekend.
Thanks.
Comments
Or are you trying to reshow ad on every AD_FAILED event, cause that might also cause it. You can try giving it some time out, like
No, I'm not trying to reshow ad on every AD_FAILED event.
I'll try to show the next framework if the previous fails, or I'll try to reshow some times before go to the next one. Something like:
------
... initializations ...
If both chartboost & heyzap fails then there is no ad.
The same with the pair iad/admob banners, for example.
Yesterday I was trying to "patch it" with a connection checking, with the same technique indicated here: http://giderosmobile.com/forum/discussion/3850/can-i-check-the-type-of-device-internet-connection/p1
The game could be run offline and go to background. Then after some time the user could play again and then it could be that there is connection.
But you know...it's difficult to get the control out of the plugin.
Also once you get there is no connection you have to check the connection again in the game (between scenes for example) in order to active the ad if possible. And the opposite too.
I suppose you could patch it better.
Please, let me know asap.
Thanks.
https://play.google.com/store/apps/developer?id=SimplesApps
http://www.amazon.com/gp/mas/dl/android?p=com.simplesapps.actionbasket
https://itunes.apple.com/artist/david-rodriguez/id763996989
As in plugin can't know if you still need an ad, when connection comes back.
What I use in my apps is as I described previously, falling back to others and then doing some timeout on the end of the fallback loop,
after timeout you just start with the first framework and going the fallback loop once again,
the timeout could be once every 30 seconds or once every minute should not bother the efficiency so much
Although an ad failed is dispatched the plugin don't forget about it because the problem with the performance continues...
Something happens in the plugin. I mean if there is no connection, the event ad_failed is detected and after that the show sentence isn't called, it seems that the plugin is trying to connect or something.
Please, let me know how to control this situation or better if you check in the plugin in order not to call the first time the first show or the Ads.new sentences.
Thanks,
David.
https://play.google.com/store/apps/developer?id=SimplesApps
http://www.amazon.com/gp/mas/dl/android?p=com.simplesapps.actionbasket
https://itunes.apple.com/artist/david-rodriguez/id763996989
So most probably end framework is the one, that is responsible for incorrect handling of the situation.
My fix would be to check if there is an Internet connection and not calling the ad framework at all
You can try placing this files in Plugins/Ads directory replacing some existing files:
I had tried to check the Internet connection and if there isn't then not calling the ad framework at all, like you say.
Now I'm trying to do the check with the hasConnection() method... but how to achieve the call? I have built the Gideros Player with your files but I suppose you have to add something in order to allow the call to hasConnection().
And what about the Android version files including these method?
Please @ar2rsawseen , let me know.
Thank you.
https://play.google.com/store/apps/developer?id=SimplesApps
http://www.amazon.com/gp/mas/dl/android?p=com.simplesapps.actionbasket
https://itunes.apple.com/artist/david-rodriguez/id763996989
https://play.google.com/store/apps/developer?id=SimplesApps
http://www.amazon.com/gp/mas/dl/android?p=com.simplesapps.actionbasket
https://itunes.apple.com/artist/david-rodriguez/id763996989
I already implemented the hasConnection check in AdsClass
So you don't have to do anything addiotnally, only copying over files and including new ones (which are Reachability files) to xcode
you want to say that still does not help?
That's ok, the check in the loadAd & showAd before to call the actual method for the framework (hideAdd also would be nice), but that's not all you have to do in order to control the program flow.
I mean you have to know if there's connection in the main (or scenes) to call or not some functions for the ads or another functions in the program. So I tried to add the method "hasConnection" to the ads (GAds class) in order to call as an ads class method (or maybe as a new "connection" class).
Anyway, I need the checks also for Android, so do could you attach the files for it?
Thanks.
https://play.google.com/store/apps/developer?id=SimplesApps
http://www.amazon.com/gp/mas/dl/android?p=com.simplesapps.actionbasket
https://itunes.apple.com/artist/david-rodriguez/id763996989
Sure, it should be something like this:
I think it would be better to put them (iOS & Android patches) as a new Ads Interface minor version, don't you?
And 'hasConnection()' would be a nice useful public method for a new connection class instead of using a tailor made function based on UrlLoader, like example of @ianchia for the @mells question (http://giderosmobile.com/forum/discussion/3850/can-i-check-the-type-of-device-internet-connection/p1)
https://play.google.com/store/apps/developer?id=SimplesApps
http://www.amazon.com/gp/mas/dl/android?p=com.simplesapps.actionbasket
https://itunes.apple.com/artist/david-rodriguez/id763996989
thus don't have access to ssh and can't upload it to the labs, will do it when I get back home
Btw, when you update the Ads Interface, please update the SDKs.
You know Apple will reject an app due to the IDFA terms:
http://stackoverflow.com/questions/23315368/improper-idfa-usage-your-app-is-not-respecting-the-limit-ad-tracking-setting-in
I mean to update the Ad platforms SDKs, for example Admob to the last 6.8.0 , etc...
Many thanks again.
https://play.google.com/store/apps/developer?id=SimplesApps
http://www.amazon.com/gp/mas/dl/android?p=com.simplesapps.actionbasket
https://itunes.apple.com/artist/david-rodriguez/id763996989