Skip to main content


Requires Cordova plugin: cordova-plugin-network-information. For more info, please see the Network plugin docs.

Stuck on a Cordova issue?

Don't waste precious time on plugin issues.

If you're building a serious project, you can't afford to spend hours troubleshooting. Ionic’s experts offer premium advisory services for both community plugins and premier plugins.


$ npm install cordova-plugin-network-information $ npm install @ionic-native/network $ ionic cap sync

Supported Platforms#

  • Amazon Fire OS
  • Android
  • Browser
  • iOS
  • Windows



Learn more about using Ionic Native components in React


import { Network } from '@ionic-native/network/ngx';
constructor(private network: Network) { }
// watch network for a disconnectionlet disconnectSubscription = => {  console.log('network was disconnected :-(');});
// stop disconnect watchdisconnectSubscription.unsubscribe();

// watch network for a connectionlet connectSubscription = => {  console.log('network connected!');  // We just got a connection but we need to wait briefly   // before we determine the connection type. Might need to wait.  // prior to doing any api requests as well.  setTimeout(() => {    if ( === 'wifi') {      console.log('we got a wifi connection, woohoo!');    }  }, 3000);});
// stop connect watchconnectSubscription.unsubscribe();