# cordova-plugin-network-information This plugin provides an implementation of an old version of the [Network Information API](http://www.w3.org/TR/2011/WD-netinfo-api-20110607/). It provides information about the device's cellular and wifi connection, and whether the device has an internet connection. :warning: Report issues on the [Apache Cordova issue tracker](https://issues.apache.org/jira/issues/?jql=project%20%3D%20CB%20AND%20status%20in%20%28Open%2C%20%22In%20Progress%22%2C%20Reopened%29%20AND%20resolution%20%3D%20Unresolved%20AND%20component%20%3D%20%22Plugin%20Network%20Information%22%20ORDER%20BY%20priority%20DESC%2C%20summary%20ASC%2C%20updatedDate%20DESC) ## Installation cordova plugin add cordova-plugin-network-information ## Supported Platforms - Amazon Fire OS - Android - BlackBerry 10 - Browser - iOS - Windows Phone 7 and 8 - Tizen - Windows - Firefox OS # Connection > The `connection` object, exposed via `navigator.connection`, provides information about the device's cellular and wifi connection. ## Properties - connection.type ## Constants - Connection.UNKNOWN - Connection.ETHERNET - Connection.WIFI - Connection.CELL_2G - Connection.CELL_3G - Connection.CELL_4G - Connection.CELL - Connection.NONE ## connection.type This property offers a fast way to determine the device's network connection state, and type of connection. ### Quick Example function checkConnection() { var networkState = navigator.connection.type; var states = {}; states[Connection.UNKNOWN] = 'Unknown connection'; states[Connection.ETHERNET] = 'Ethernet connection'; states[Connection.WIFI] = 'WiFi connection'; states[Connection.CELL_2G] = 'Cell 2G connection'; states[Connection.CELL_3G] = 'Cell 3G connection'; states[Connection.CELL_4G] = 'Cell 4G connection'; states[Connection.CELL] = 'Cell generic connection'; states[Connection.NONE] = 'No network connection'; alert('Connection type: ' + states[networkState]); } checkConnection(); ### API Change Until Cordova 2.3.0, the `Connection` object was accessed via `navigator.network.connection`, after which it was changed to `navigator.connection` to match the W3C specification. It's still available at its original location, but is deprecated and will eventually be removed. ### iOS Quirks -