5 Replies Latest reply on Jan 11, 2017 11:31 PM by VectorP

    Offline event is not working

    sethup51656429 Level 1

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

      function onOffline() { alert("you are offline"); window.plugins.toast.showShortTop('Hello there!', function (a) { console.log('toast success: ' + a) }, function (b) { alert('toast error: ' + b) }) }

       

      This is my code ........when i put my device into flight mode the offline event doesn't responding....

      Can you give me a solution....

       

      For the toast i'm using the plugin

      " cordova-plugin-x-toast "