Last active
January 15, 2016 21:35
-
-
Save marchbold/eacac9fee2052914fb67 to your computer and use it in GitHub Desktop.
Determine the network availability of your application, whether it has an internet access and whether it is a cellular (WWAN) or WiFi connection
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
NetworkInfo.init( "" ); | |
NetworkInfo.networkInfo.addEventListener( | |
NetworkInfoEvent.CHANGE, | |
networkChangeHandler | |
); | |
... | |
private function networkChangeHandler( event:NetworkInfoEvent ):void | |
{ | |
trace( "isReachable=" + NetworkInfo.networkInfo.isReachable() ); | |
trace( "isWWAN=" + NetworkInfo.networkInfo.isWWAN() ); | |
} | |
// com.distriqt.NetworkInfo |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
http://airnativeextensions.com/extension/com.distriqt.NetworkInfo