I installed the plugin below to detect the status of internet connection. It worked, however, I noticed that it only detects when status change occurs (Connect or disconnect), how could I get the initial status when opening the app without necessarily connecting to the device or not?
Hi, I was able to solve it in a simple way:
checkConnection() : boolean{
if (this.network.type == "none") {
this.toast.create({
message: 'Check your conection.',
duration: 3000
}).present();
return false;
} else {
return true;
}
}
Just check the type of active connection, if it means that there is no connection in the device.