For desktop applications, you often need the ability to detect the status of network connectivity and monitor its changes. Some applications require a constant Internet connection, while others, called occasionally connected applications, can work offline as well as online by caching the offline content. Adobe AIR can detect network connectivity changes, thereby enabling you to plan the behavior of the application based on its status.
Import the service monitor framework into the AIR application.
To import the file, use the
script tag. The tag’s
type attribute specifies the scripting
language of the element’s contents and overrides the default scripting
language. Set the
type attribute to
value, as shown here:
<script type="application/x-shockwave-flash" src="frameworks/servicemonitor.swf"></script>
In the previous line of code, the servicemonitor.swf file resides in the frameworks ...