Return-Path: X-Original-To: archive-asf-public-internal@cust-asf2.ponee.io Delivered-To: archive-asf-public-internal@cust-asf2.ponee.io Received: from cust-asf.ponee.io (cust-asf.ponee.io [163.172.22.183]) by cust-asf2.ponee.io (Postfix) with ESMTP id ACDC1200D42 for ; Fri, 17 Nov 2017 12:38:04 +0100 (CET) Received: by cust-asf.ponee.io (Postfix) id AB65B160C0A; Fri, 17 Nov 2017 11:38:04 +0000 (UTC) Delivered-To: archive-asf-public@cust-asf.ponee.io Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by cust-asf.ponee.io (Postfix) with SMTP id CB2BC160BF8 for ; Fri, 17 Nov 2017 12:38:03 +0100 (CET) Received: (qmail 74266 invoked by uid 500); 17 Nov 2017 11:38:03 -0000 Mailing-List: contact issues-help@cordova.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Delivered-To: mailing list issues@cordova.apache.org Received: (qmail 74255 invoked by uid 99); 17 Nov 2017 11:38:02 -0000 Received: from pnap-us-west-generic-nat.apache.org (HELO spamd1-us-west.apache.org) (209.188.14.142) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 17 Nov 2017 11:38:02 +0000 Received: from localhost (localhost [127.0.0.1]) by spamd1-us-west.apache.org (ASF Mail Server at spamd1-us-west.apache.org) with ESMTP id 32AD2C6798 for ; Fri, 17 Nov 2017 11:38:02 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd1-us-west.apache.org X-Spam-Flag: NO X-Spam-Score: -100.002 X-Spam-Level: X-Spam-Status: No, score=-100.002 tagged_above=-999 required=6.31 tests=[RP_MATCHES_RCVD=-0.001, SPF_PASS=-0.001, USER_IN_WHITELIST=-100] autolearn=disabled Received: from mx1-lw-us.apache.org ([10.40.0.8]) by localhost (spamd1-us-west.apache.org [10.40.0.7]) (amavisd-new, port 10024) with ESMTP id CeuLIAkq9uo2 for ; Fri, 17 Nov 2017 11:38:01 +0000 (UTC) Received: from mailrelay1-us-west.apache.org (mailrelay1-us-west.apache.org [209.188.14.139]) by mx1-lw-us.apache.org (ASF Mail Server at mx1-lw-us.apache.org) with ESMTP id E8D175FD01 for ; Fri, 17 Nov 2017 11:38:00 +0000 (UTC) Received: from jira-lw-us.apache.org (unknown [207.244.88.139]) by mailrelay1-us-west.apache.org (ASF Mail Server at mailrelay1-us-west.apache.org) with ESMTP id 75AEFE0D27 for ; Fri, 17 Nov 2017 11:38:00 +0000 (UTC) Received: from jira-lw-us.apache.org (localhost [127.0.0.1]) by jira-lw-us.apache.org (ASF Mail Server at jira-lw-us.apache.org) with ESMTP id 2C237240CE for ; Fri, 17 Nov 2017 11:38:00 +0000 (UTC) Date: Fri, 17 Nov 2017 11:38:00 +0000 (UTC) From: "Valentin (JIRA)" To: issues@cordova.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Updated] (CB-13585) Called "offline" instead "resume" event after sleep MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 archived-at: Fri, 17 Nov 2017 11:38:04 -0000 [ https://issues.apache.org/jira/browse/CB-13585?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Valentin updated CB-13585: -------------------------- Description: _emphasized text_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 my 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 {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" > 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 > > _emphasized text_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 my 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