cordova-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Raghav Katyal (JIRA)" <>
Subject [jira] [Commented] (CB-10766) resume and pause events not firing in Windows / Windows Phone 8.1 and 10
Date Fri, 18 Mar 2016 21:49:33 GMT


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:
>             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

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message