title: how to detect internet connectivity in ionic 5
body: <p>I am working on an android app and I want to detect when my internet connection is available and not with this ionic plugin, <code>cordova-plugin-network-information</code>but when i ran this command <code>ionic cordova plugin add cordova-plugin-network-information</code> in my command prompt i got this error</p>
  <pre><code>Unexpected token   in JSON at position 0
  [ERROR] An error occurred while running subprocess cordova.    
          cordova.cmd plugin add cordova-plugin-network-information exited with exit code 1.    
          Re-running this command with the --verbose flag may provide more information.
  </code></pre>
  <p>even when i added the <code>--verbose</code> to it, i still got the same error i am using windows 10, please how can i resolve this</p>