Skip to content

Air Native Extension for checking network connectivity.

License

Notifications You must be signed in to change notification settings

StickSports/Network-ANE

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Air Native Extension for social messaging on iOS

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.

Binary files

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).

Using the extension

Test if the extension is supported

NetworkStatus.isSupported : Boolean;

Is a boolean. Will return false on platforms where the extension is not supported.

Test if the device has an active network connection

NetworkStatus.hasConnection : Boolean;

Get a vector of all network interfaces

NetworkStatus.findInterfaces() : Vector.<NetworkInterface>

Receive notifications when the network status changes

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

License

This project is licensed under the BSD license

About

Air Native Extension for checking network connectivity.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 3

  •  
  •  
  •