Hi. I’m trying to check my concection type with cordova-plugin-network-information.
The docs says to use Network.type but the editor says this property doesn’t exists, and with Network.connection (whose discription says it returns a string with the internet type) always returns undefined.
Is there a workaround? something to do? Here is the piece of code i’m using:
constructor(public navCtrl: NavController, public storage: Storage, public navP: NavParams, public platform: Platform, public alerts: AlertController) {
//observable para disconnect
Network.onDisconnect().subscribe(() => {
this.navCtrl.popToRoot();
this.conectado = false;
});
//observable para conect
Network.onConnect().subscribe(() => {
console.log(Network.connection);
this.conectado = true;
});
}
Thanks in advance