0

I need my client to check if the user connection with my server is strong or weak or etc, so i searched a lot and i think using URLLoader may be the answer:

I need to ping to an network with flash or actionscript

Is there a better way or this should do it?

Community
  • 1
  • 1
Thiago Sabin
  • 137
  • 1
  • 12

1 Answers1

1

The only thing using a URLLoader will tell you is if the device has a connection to that server or not. There is no in between, as you seem to desire. Additionally, if the requested server is down or slow (and Flash times out), your app will think it has no connection to the internet at all.

If you are using Adobe AIR, I suggest looking for an AIR Native Extension (commonly abbreviated to ANE) that does this. FreshPlanet has one called "ANE-Network-Info" that provides a way for iOS and Android apps to read if they have a network connection or not, though no way to get signal strength. Do some searching and you will probably find one, at least for iOS and/or Android.

If this isn't an AIR app, there's not much you can do. I suggest you treat it as any other website. If the connection drops or is weak, that's the problem of the client, not yours. If a request to a server fails, alert them. Beyond that, I don't think there is much else you can do.

Josh
  • 8,079
  • 3
  • 24
  • 49