The Connection global houses the constants which you would normally use to compare the value of navigator.network.connection to, as per the docs example:
http://docs.phonegap.com/en/1.4.1/phonegap_connection_connection.md.html#Co nnection Connection.WIFI, etc. Both are required, and both should be common to all platforms. For iOS, we'll have to move the connection information into a proper plugin (if its not already there) instead of just dumping it on the device.connection global. On 12-02-23 9:32 AM, "Drew Walters" <[email protected]> wrote: >There is still a Connection object defined in Connection.js which is >made globally available during bootstrap (common.js objects). The end >user access the network functionality through >navigator.network.connection.type as defined by the spec. >navigator.network.connection is globally mapped to the >NetworkConnection module by bootstrap (common.js objects) as well. > >On Thu, Feb 23, 2012 at 10:20 AM, Becky Gibson <[email protected]> >wrote: >> So, I've started working through the unified JS changs for iOS. I'm >>not >> quite sure how to handle the many differences at startup. If I'm >>reading >> the code right, there seems to be a new NetworkConnection object which >> replaces the Connection object. Any reason for renaming this? It >>seems >> to me we should try to make a few api/object name changes as possible to >> make upgrading easier for folks. Also, since we are not going to get >>iOS >> updated for 1.5, we will have a discrepancy between platforms with some >> using NetworkConnection and iOS at least still using Connection. >> >> Is there any requirement fo this NetworkConenction.getInfo() api? I can >> certainly override that module for iOS to continue with the current iOS >> implementation or I can implement a getInfo() api. The same issue >>occurs >> for the Device object - other platforms implement a getInfo() api to get >> the info. iOS calls out to JS to set the info during startup. >> >> -becky
