title: Cannot read property 'connection' of undefined. in Cordova 3.2.0
body: <p>I could not able to check connection state. I had successfully add plugin <code>org.apache.facebook.networkinformation</code>. But still I got error.</p>
  
  <pre><code>&lt;script type="text/javascript" src="cordova.js"&gt;&lt;/script&gt;
  &lt;script src="js/Connection.js"&gt;&lt;/script&gt;
  &lt;script src="js/network.js"&gt;&lt;/script&gt;
   &lt;script type="text/javascript" charset="utf-8"&gt;
  
       document.addEventListener("deviceready", onDeviceReady(), false);
  
  
       function onDeviceReady() {
           alert(navigator.network.connection.type);
           alert(1);
       }
  
  
       function checkConnection() {
  
           alert(navigator.network.connection.type);
           var networkConnectionType = navigator.network.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.NONE] = 'No network connection';
           alert('Connection Type: ' + states[networkConnectionType]);
       }
  
  &lt;/script&gt;
  </code></pre>