Julian Frumar created CB-8462:
---------------------------------

             Summary: Android triggers "online" event multiple times
                 Key: CB-8462
                 URL: https://issues.apache.org/jira/browse/CB-8462
             Project: Apache Cordova
          Issue Type: Bug
          Components: Plugin Network Information
    Affects Versions: 4.1.3
         Environment: Android KitKat
            Reporter: Julian Frumar


Note: The bug entry form wouldn't let me enter the correct versions because it 
said they don't exist.

Using Cordova CLI 4.2.0 and the latest (0.2.14) version of the 
org.apache.cordova.network-information plugin, we are seeing many many "online" 
events, resulting in Android devices repeatedly hitting our server for updates.

To confirm the issue:

- Create a new cordova project
- platform add android
- cordova plugin add org.apache.cordova.network-information

Then add:

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

and console.log each time the event's received.

I am seeing it 3 or 4 times each time I toggle Airplane mode on my Samsung S5. 
We are seeing this in our logs for a wide variety of Android devices in the 
wild however.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to