Return-Path: X-Original-To: apmail-cordova-issues-archive@minotaur.apache.org Delivered-To: apmail-cordova-issues-archive@minotaur.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id C562E18E5B for ; Fri, 18 Mar 2016 21:49:33 +0000 (UTC) Received: (qmail 8925 invoked by uid 500); 18 Mar 2016 21:49:33 -0000 Delivered-To: apmail-cordova-issues-archive@cordova.apache.org Received: (qmail 8896 invoked by uid 500); 18 Mar 2016 21:49:33 -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 8877 invoked by uid 99); 18 Mar 2016 21:49:33 -0000 Received: from arcas.apache.org (HELO arcas) (140.211.11.28) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 18 Mar 2016 21:49:33 +0000 Received: from arcas.apache.org (localhost [127.0.0.1]) by arcas (Postfix) with ESMTP id 738062C1F56 for ; Fri, 18 Mar 2016 21:49:33 +0000 (UTC) Date: Fri, 18 Mar 2016 21:49:33 +0000 (UTC) From: "Raghav Katyal (JIRA)" To: issues@cordova.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Commented] (CB-10766) resume and pause events not firing in Windows / Windows Phone 8.1 and 10 MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 [ https://issues.apache.org/jira/browse/CB-10766?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15202228#comment-15202228 ] Raghav Katyal commented on CB-10766: ------------------------------------ I believe this is the "normal" behavior since Windows does not "suspend" your app when it is being debugged. The only way to change the application state is through the 'Lifecycle event' options inside VS. But the events should work fine when the app is run in the normal scenario on the device. > resume and pause events not firing in Windows / Windows Phone 8.1 and 10 > ------------------------------------------------------------------------ > > Key: CB-10766 > URL: https://issues.apache.org/jira/browse/CB-10766 > Project: Apache Cordova > Issue Type: Bug > Components: Windows > Affects Versions: 6.0.0 > Environment: Windows 10, Visual Studio 2015 > Reporter: Ugljesa Erceg > Assignee: Raghav Katyal > Priority: Critical > Labels: windows > > I have generated Cordova app and added windows platform to it. I am using Visual Studio 2015 to open the project and app runs just fine. For me it is very important to subscribe to certain Cordova events. Among others: deviceready, resume and pause. I subscribe to deviceready like this in index.js: > document.addEventListener('deviceready', this.onDeviceReady, false); > And I get this event fired by Cordova and received when running the app on Windows Phone 8.1, Windows Phone (with Windows 10) and Windows 10 (desktop). > After 'deviceready' event is fired, I am subscribing to 'resume' and 'pause' events. I tried with single and double quotes (it doesn't look like it should make any difference): > document.addEventListener('resume', onResume, false); > document.addEventListener('pause', onPause, false); > But these events are not getting fired when I bring my app to background/foreground. I was testing while debugging or if app is built in release mode. No way that I can trigger any of these methods (onResume or onPause). Only way I saw onPause getting triggered is when I debug app in Visual Studio and once I hit Stop button (to terminate debugging session), in that moment onPause gets triggered. > Is this known bug or "normal" behaviour? -- This message was sent by Atlassian JIRA (v6.3.4#6332) --------------------------------------------------------------------- To unsubscribe, e-mail: issues-unsubscribe@cordova.apache.org For additional commands, e-mail: issues-help@cordova.apache.org