Please note that we are no longer able to support this project and are not contributing to it.
This is an Air native extension for checking network connectivity on iOS. It works with a single common interface on iOS and on all platforms supported by Air’s NetworkInfo class.
The bin folder contains the compiled extension and the default swc, which can be used for local testing if required by your development environment (Flash Builder shouldn’t need it, but other IDEs may).
NetworkStatus.isSupported : Boolean;
Is a boolean. Will return false on platforms where the extension is not supported.
NetworkStatus.hasConnection : Boolean;
NetworkStatus.findInterfaces() : Vector.<NetworkInterface>
NetworkStatus.startCheckingForConnection( interval : int ) : void
where interval is the number of seconds between each check.
When the network status changes the signal
NetworkStatus.networkStatusChanged
will dispatch, with a parameter indicating if the network has a connection or not. So listen for this signal with a function like
function statusChanged( hasConnection : Boolean ) :void { ... }
which you add to the signal with
NetworkStatus.networkStatusChanged.add( statusChanged );
To stop polling for changes in the connection status
NetworkStatus.stopCheckingForConnection() : void
This project is licensed under the BSD license