You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@cordova.apache.org by "Joe Bowser (JIRA)" <ji...@apache.org> on 2014/05/13 00:42:16 UTC

[jira] [Updated] (CB-6480) Resume event is sometimes not fired when system time is changed

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

Joe Bowser updated CB-6480:
---------------------------

    Priority: Minor  (was: Major)

This would realistically only happen when driving across timezones, which isn't a super regular occurrence.  I don't see a use case where someone would normally be setting their time minutes in the past.

> Resume event is sometimes not fired when system time is changed
> ---------------------------------------------------------------
>
>                 Key: CB-6480
>                 URL: https://issues.apache.org/jira/browse/CB-6480
>             Project: Apache Cordova
>          Issue Type: Bug
>          Components: Android
>    Affects Versions: 2.4.0, 3.4.0
>         Environment: Android 4.1.2. Both real device (LG-P710) and emulator.
>            Reporter: Kaupo Kuresson
>            Priority: Minor
>
> I managed to reproduce the bug in a simple 'HelloWorld' app:
> 1. cordova create hello com.example.hello HelloWorld
> 2. cordova platform add android
> 3. add listeners to "pause" and "resume" events:
> {code:JavaScript}
> var app = {
>     // Application Constructor
>     initialize: function() {
>         this.bindEvents();
>     },
>     // Bind Event Listeners
>     //
>     // Bind any events that are required on startup. Common events are:
>     // 'load', 'deviceready', 'offline', and 'online'.
>     bindEvents: function() {
>         document.addEventListener('pause', this.onPause, false);
>         document.addEventListener('resume', this.onResume, false);
>     },
>     onPause: function() {
>         console.log("PAUSED");
>     },
>     onResume: function() {
>         console.log("RESUMED");
>     },
> };
> {code}
> Steps to reproduce the bug:
> 1. Launch the app
> 2. Go to "Date & time" settings. (Pause event works fine, prints "PAUSED")
> 3. Set system time to be some minutes in the past manually.
> 4. Resume app. (Resume event works fine, prints "RESUMED")
> 5. Go to "Date & time" settings again. (Pause event works fine, prints "PAUSED")
> 6. Check "Automatic date & time", so time is corrected.
> 7. Resume app. (Resume event is NOT fired at first. It is fired later, once the amount of minutes that you changed the time to the past has passed.)
> Expected result would be that the resume event is fired immediately in the second case as well.



--
This message was sent by Atlassian JIRA
(v6.2#6252)