Check if there is Internet or not
BigDave
Member Posts: 2,239
After the player progressed through the game for a while I want to go harsh against the once avoiding advertising by turning their internet off.
So I thought about a check every 30 seconds if the internet is still there or not.
How would such a check be made also being 100% sure there is no internet.
Comments
@Hopscotch
I know I can do this via your free service appformative
So I can send a table to get the callback attribute.
Which table should I send to get the callback attribute?
( i also use tracking I don't wanna mess things up)
How do I get sure I don't judge to quickly if he is offline or online? (slow internet)
My Apps
https://itunes.apple.com/de/artist/david-zobrist/id733552276
https://play.google.com/store/apps/developer?id=David+Zobrist&hl=de
@BigDave
I would suggest using the get_servertime call. This will set your callback to 1 on success.
http://www.appformative.com/implementation_gamesalad_getservertime.mox
Checking every 30 seconds is maybe a bit harsh on the honest user's though. Consider only checking every 5 minutes or so. Once users know they need to be connected they will not keep switching their connection on and off every 5 minutes to trick you. If they don't like it they would rather quit the game altogether.
Remember, mobile bandwidth is quite expensive in some regions. So hammering your honest users with unnecessary traffic every 30 seconds is harsh.
Regarding slow mobile connections, yes, in some countries and rural regions there can be up to a 10 second lag (or worse) in mobile traffic. This is due to the way mobile internet is shared on old mobile infrastructure. However, this will only make up a very very small percentage of your users, who will most likely not play your game if mobile ads are forced, due to the same lag.
My suggestion is, check for connectivity now and then at the beginning of a level, then at the end of the level, when an ad is to be shown, check if the connectivity flag is true and show the ad, otherwise warn the user or penalize the user in some way you see fit.
MESSAGING, X-PLATFORM LEADERBOARDS, OFFLINE-TIMER, ANALYTICS and BACK-END CONTROL for your GameSalad projects
www.APPFORMATIVE.com
Alright! It seem to simple work with callback attribute 1 or -1
The only remains question is if I can just re-send this table every 30 seconds without breaking the tracking.
My Apps
https://itunes.apple.com/de/artist/david-zobrist/id733552276
https://play.google.com/store/apps/developer?id=David+Zobrist&hl=de
@Hopscotch
alright good points.
So less often ( i anyways start only after quest 9 was finished so committed players) and use
http://www.appformative.com/implementation_gamesalad_getservertime.mox
thanks buddy!
My Apps
https://itunes.apple.com/de/artist/david-zobrist/id733552276
https://play.google.com/store/apps/developer?id=David+Zobrist&hl=de
Some complex solution but its now doing its purpose.
Premium: Shows no ad and makes no connection attempt, lets you play offline
Before quest 9: Shows video ad every 100 seconds after the initial 180 seconds.
Or resets the scene if no internet connection. No offline/online check is done.
After quest 9: Checks for connection on every potential video appearance moment, decides to show video or go to offline screen block page. After re-connecting if the player was offline a video will be played on the next event.
Also there is one offline/online check on app startup
My Apps
https://itunes.apple.com/de/artist/david-zobrist/id733552276
https://play.google.com/store/apps/developer?id=David+Zobrist&hl=de
My Blog / App Store / Google Play
@Hopscotch
now I also have server time, I SEE WHAT YOU DID THERE
My Apps
https://itunes.apple.com/de/artist/david-zobrist/id733552276
https://play.google.com/store/apps/developer?id=David+Zobrist&hl=de
Tja, we drag you kicking and screaming into the future.
MESSAGING, X-PLATFORM LEADERBOARDS, OFFLINE-TIMER, ANALYTICS and BACK-END CONTROL for your GameSalad projects
www.APPFORMATIVE.com