Cordova plugin network information doesn't work on desktop Windows 10 app

314 views Asked by At

I am making hybrid application in IntelXDK for Android and desktop version Windows 10 (appx) and I use the cordova-plugin-network-information to check internet connection. When I test my app on Android device it works fine, but in Windows 10 desktop app nothing happens, what could be the problem?

Here's my checkConnection.js

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";   
}
0

There are 0 answers