Ionic2 and cordova-plugin-network-information not working

Hi All,

I am using Ionic2 rc4, and want to check the network connection. Following this documentation and this documentation, I install the plugins:

$ ionic plugin add cordova-plugin-network-information
$ npm install --save @ionic-native/network


platform.ready().then(() => {

public checkNetwork(): void {

    document.addEventListener("offline", this.offline, false);
    document.addEventListener("online",, false);

    Network.onConnect().subscribe(()=> {
        console.log('Network.type = ', Network.connection,;;


offline() {

online() {

The offline() and online() functions, never get ionvoked.