With Adobe AIR native extensions, it is extremely easy to read the Network info like , connectivity status, network availability etc on your android device from within your AIR application. This extension intends to fill up the missing gaps in the built in NetworkInfo class provided in AIR SDK Here is how to get going…
1. Download the free version of our native extension – NetworkInfo – from:
https://flashvisions.com/goodies/air-android-extensions/networkinfo-extension/
2. Create a instance of NetworkInfo :
var networkInfo:NetworkInfo = new NetworkInfo();
3. Request information through public functions
trace(networkInfo.getDetailedState());
trace(networkInfo.isNetworkConnected());
trace(networkInfo.isNetworkAvailable());
Return values for getDetailedState() and getCoarseState() are CONSTANT names from thr original Android API, NetworkInfo.DetailedState and NetworkInfo.State respectively.
http://developer.android.com/reference/android/net/NetworkInfo.DetailedState.html
http://developer.android.com/reference/android/net/NetworkInfo.State.html