title: How to get User Ip address and check that user is online in Ionic\Cordova
body: <p>I am working on Ionic Framework and cordova. I want to submit some data to server
  but when these two condition are satisfied
  1. device is online.
  2. data (to submit) is available .</p>
  
  <p>i am checking this cordova network plugin <a href="http://plugins.cordova.io/#/package/org.apache.cordova.network-information" rel="nofollow">documentation</a> but i am confuse that there is too many quirks in it. How can i write valid code for all devices(means android, win Phone, IPhone etc..) and also how can i get user IP Address.??
  i have tried this, working fine in browser but afraid to implement cause mobile phone can ignore this line (i guess)</p>
  
  <pre><code>$scope.checkOnline = navigator.onLine;
  </code></pre>