When the network connectivity is shaky (such as at busy airport using free WiFi service, for example), my app appears to stall at key juncture on my test devices (iPod Touches). I believe it stalls when the app is trying to perform some network requests (such as posting high score or achievements to Game Center or sending/retrieving data to/from the backend server.) In my app, these network requests are supposed to happen silently behind the scene and are not meant to affect the user experience. When the app detects no connection, it is currently set up to skip these network requests. So I think the solution to this problem is to check to see if the network connectivity is strong, and if it’s not, just skip these network requests as if there’s no connection (and where appropriate or necessary, notify the user that the request cannot be processed due to the network connectivity issue.)
But I’m not sure how I may go about doing this. I looked at network reachability API (http://docs.coronalabs.com/api/event/networkStatus/index.html) I also looked at the sample code ( CoronaSDK/SampleCode/Networking/Reachability ) But it doesn’t look like it returns/checks how strong the connectivity is – instead, it only returns what type of connection it has (i.e., no connection, WiFi connection or Cellular connection.) Please note, I haven’t used this API to check any connectivity exists, but instead, I check the connectivity by pinging www.apple.com or www.google.com (because I coded it before this new API came to being – and since this API works only with iOS, I’d still need to ping www.google.com for Android…)
Anyhow, does anyone know if there’s other API I should look at to solve this problem? If no API can be used to solve it, does anyone know ways to solve this problem. I’d appreciate any and all suggestions, tips and pointers you might be able to offer.
Naomi
[import]uid: 67217 topic_id: 34766 reply_id: 334766[/import]