Software Archive
Read-only legacy content
17060 Discussions

Cordova network information doesn't work on Windows 10 app

Tymek_T_
Beginner
437 Views

Hi, I've got an issue with cordova-plugin-network-information. I am making app for Android and Windows 10 desktop. When I use cordova network information plugin on Android device it work fine. On Windows 10 desktop it fails, there's no action. Here's my code:

 

document.addEventListener("offline", onOffline, false);
document.addEventListener("online", onOnline, false);

function onOffline() {
   alert('Not connected.');
   document.getElementById("networkInfo").textContent = "No connection";
}

function onOnline() {
   document.getElementById("networkInfo").textContent = "Connected";   
}

 

What could be the issue?

0 Kudos
0 Replies
Reply