6. Connection

The Cordova Connection object provides an application with information about the current network connection available on the device (and available to the application).

An application would use the Connection object to help it determine if network connectivity is available as well as the type of connection that is available. If the application had data to upload to or retrieve from a server, knowing whether the connection is available will help the application to determine whether or not to begin the transfer. If an application is working with a large amount of data that it needed to upload to or retrieve from a server, the capability for the application to be able to tell what type of connection is available will allow it to only ...

Get Apache Cordova API Cookbook now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.