Free Trial

Safari Books Online is a digital library providing on-demand subscription access to thousands of learning resources.


  • Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • DownloadDownload
  • PrintPrint
Share this Page URL
Help

Chapter 8. Working with the Presence API

Chapter 8. Working with the Presence API

Any computer that relies on a network connection runs the risk of losing its connection due to a technical problem or a lack of connectivity. AIR enables applications to handle such cases without interrupting the workflow by means of the Presence API. This chapter will discuss using the ServiceMonitor class to determine if a network connection is available, and the URLMonitor class to detect if HTTP communication is allowed to a specified address. The chapter will also illustrate how you can use the SocketMonitor class to determine if a particular socket is available on a firewalled or router-protected connection. In addition to understanding the classes, this chapter will look at how the dpTimeTracker application uses the Presence API to check if the user has a connection, and if so, check the server to see if there are any updates to the application.


  

You are currently reading a PREVIEW of this book.

                                                                                        

Get instant access to over
$1 million worth of books and videos.

  

Start a Free Trial