title: Detect if phone is online/offline with PHONEGAP reachability API
body: <p>Hi and thanks in advance,</p>
  
  <p>I'm aware Phonegap has a reachability API and I'd like to know how I can use it to detect if the phone is connected to the network or not.</p>
  
  <p>What I found is here: <a href="http://github.com/phonegap/mobile-spec/blob/master/tests/network.tests.js" rel="nofollow noreferrer">http://github.com/phonegap/mobile-spec/blob/master/tests/network.tests.js</a></p>
  
  <p>I just don't know how to use it or if it even suits my needs.</p>
  
  <p>Thanks again.</p>