incubator-callback-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Andrew Grieve (JIRA)" <>
Subject [jira] [Created] (CB-1269) navigator.onLine and related events never fire on Android
Date Tue, 21 Aug 2012 17:27:38 GMT
Andrew Grieve created CB-1269:

             Summary: navigator.onLine and related events never fire on Android
                 Key: CB-1269
             Project: Apache Cordova
          Issue Type: Bug
          Components: Android
    Affects Versions: 2.0.0
            Reporter: Andrew Grieve
            Assignee: Andrew Grieve

Discovered this when doing bridge testing. 

function onLineEvent2(e) {
    console.log('Got online=' + navigator.onLine);
window.addEventListener('online', onLineEvent2, false);
window.addEventListener('offline', onLineEvent2, false);

The events never fire when I put my phone in and out of airplane mode. I see the following

08-21 13:20:14.095: D/DroidGap(12652): onMessage(networkconnection,none)

But never get an online/offline event.

If I use setNetworkAvailable() manually, the events get fired as a result. This leads me to
believe that it's the app's responsibility to call this setter in order for the events to
be fired.

This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators:!default.jspa
For more information on JIRA, see:


View raw message