cordova-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Valentin (JIRA)" <j...@apache.org>
Subject [jira] [Updated] (CB-13585) Called "offline" instead "resume" event after sleep
Date Fri, 17 Nov 2017 11:37:00 GMT

     [ https://issues.apache.org/jira/browse/CB-13585?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]

Valentin updated CB-13585:
--------------------------
    Description: 
Hi.

I using


{code:java}
        "cordova-android": "^6.2.3",
        "cordova-ios": "^4.4.0",
        "cordova-plugin-crosswalk-webview": "^2.3.0",
        "cordova-plugin-firebase": "^0.1.21",
        "cordova-plugin-inappbrowser": "^1.7.1",
        "cordova-plugin-network-information": "^1.3.3",
        "cordova-plugin-splashscreen": "^4.0.3",
        "cordova-plugin-statusbar": "^2.2.3",
        "cordova-plugin-whitelist": "^1.3.2",
        "cordova-plugin-x-toast": "^2.6.0"
{code}


Cordova version: 7.0.1

I listen events in ny deviceReady function


{code:java}
         document.addEventListener("resume", function() {
                console.log(window.navigator.connection.type);
                console.log('resume', (new Date));
        }, false);
        document.addEventListener("pause", function() {
                console.log(window.navigator.connection.type);
                console.log('resume', (new Date));
        }, false);
        document.addEventListener("offline", function() {
                console.log(window.navigator.connection.type);
                console.log('resume', (new Date));
        }, false);
        document.addEventListener("online", function() {
                console.log(window.navigator.connection.type);
                console.log('resume', (new Date));
        }, false);
{code}



Everything works fine, until I lock my Android for more than 10 minutes
After I go into the application I do not trigger the "resume" trigger, and triggers "offline"
and the window.navigator.connection.type returns none. 

Now the application does not work the Internet, although in other applications the network
works.

This happens until I turn off and turn on the wifi.
After that on the logs I see how the trigger was called "resume"


  was:
Hi.

I using

{{        "cordova-android": "^6.2.3",
        "cordova-ios": "^4.4.0",
        "cordova-plugin-crosswalk-webview": "^2.3.0",
        "cordova-plugin-firebase": "^0.1.21",
        "cordova-plugin-inappbrowser": "^1.7.1",
        "cordova-plugin-network-information": "^1.3.3",
        "cordova-plugin-splashscreen": "^4.0.3",
        "cordova-plugin-statusbar": "^2.2.3",
        "cordova-plugin-whitelist": "^1.3.2",
        "cordova-plugin-x-toast": "^2.6.0"}}

Cordova version: 7.0.1

I listen events in ny deviceReady function

         document.addEventListener("resume", function() {
                console.log(window.navigator.connection.type);
                console.log('resume', (new Date));
        }, false);
        document.addEventListener("pause", function() {
                console.log(window.navigator.connection.type);
                console.log('resume', (new Date));
        }, false);
        document.addEventListener("offline", function() {
                console.log(window.navigator.connection.type);
                console.log('resume', (new Date));
        }, false);
        document.addEventListener("online", function() {
                console.log(window.navigator.connection.type);
                console.log('resume', (new Date));
        }, false);


Everything works fine, until I lock my Android for more than 10 minutes
After I go into the application I do not trigger the "resume" trigger, and triggers "offline"
and the window.navigator.connection.type returns none. 

Now the application does not work the Internet, although in other applications the network
works.

This happens until I turn off and turn on the wifi.
After that on the logs I see how the trigger was called "resume"



> Called "offline" instead "resume" event after sleep
> ---------------------------------------------------
>
>                 Key: CB-13585
>                 URL: https://issues.apache.org/jira/browse/CB-13585
>             Project: Apache Cordova
>          Issue Type: Bug
>          Components: cordova-plugin-network-information
>            Reporter: Valentin
>
> Hi.
> I using
> {code:java}
>         "cordova-android": "^6.2.3",
>         "cordova-ios": "^4.4.0",
>         "cordova-plugin-crosswalk-webview": "^2.3.0",
>         "cordova-plugin-firebase": "^0.1.21",
>         "cordova-plugin-inappbrowser": "^1.7.1",
>         "cordova-plugin-network-information": "^1.3.3",
>         "cordova-plugin-splashscreen": "^4.0.3",
>         "cordova-plugin-statusbar": "^2.2.3",
>         "cordova-plugin-whitelist": "^1.3.2",
>         "cordova-plugin-x-toast": "^2.6.0"
> {code}
> Cordova version: 7.0.1
> I listen events in ny deviceReady function
> {code:java}
>          document.addEventListener("resume", function() {
>                 console.log(window.navigator.connection.type);
>                 console.log('resume', (new Date));
>         }, false);
>         document.addEventListener("pause", function() {
>                 console.log(window.navigator.connection.type);
>                 console.log('resume', (new Date));
>         }, false);
>         document.addEventListener("offline", function() {
>                 console.log(window.navigator.connection.type);
>                 console.log('resume', (new Date));
>         }, false);
>         document.addEventListener("online", function() {
>                 console.log(window.navigator.connection.type);
>                 console.log('resume', (new Date));
>         }, false);
> {code}
> Everything works fine, until I lock my Android for more than 10 minutes
> After I go into the application I do not trigger the "resume" trigger, and triggers "offline"
and the window.navigator.connection.type returns none. 
> Now the application does not work the Internet, although in other applications the network
works.
> This happens until I turn off and turn on the wifi.
> After that on the logs I see how the trigger was called "resume"



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)

---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@cordova.apache.org
For additional commands, e-mail: issues-help@cordova.apache.org


Mime
View raw message