cordova-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Mike Kwan (JIRA)" <j...@apache.org>
Subject [jira] [Updated] (CB-3534) deviceready not fired and cordova.exec events queued up till backgrounding
Date Wed, 29 May 2013 13:35:23 GMT

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

Mike Kwan updated CB-3534:
--------------------------

    Description: 
Minimal example reproducing the problem is set up as follows:
 1. Custom container view controller split into two halves each containing a _CDVViewController_
 2. Top half loads and after a delay (1000ms) fires a _NSNotification_
 3. In response to the _NSNotification_ the top half loads a green page and the bottom half
loads a red page

Both red pages and green pages have an event listener for *deviceready* which does the following:

{code}
function onDeviceReady() {
    alert('deviceready from XXXXX'); // colour here
    cordova.exec(null, null, 'Echo', 'echo', ['hello']);
};
{code}

Observed behaviour:
 - _deviceready_ is fired only for the red page (bottom)
 - The _cordova.exec_ succeeds for the red page (bottom)
 - _deviceready_ is not fired for the green page (top)

The _deviceready_ can be triggered by certain events for the top page:
 - Pulling down the notification bar
 - Backgrounding

If _deviceready_ is triggered by pulling down the notification bar, the _cordova.exec_ is
still not fired for the green page. The _cordova.exec_ message is queued up and finally does
go through when the app is backgrounded.

This bug is remarkably similar to the following:
https://issues.apache.org/jira/browse/CB-2094

Perhaps it is an edge case which was overlooked? This bug reproduces on 2.3.0 and 2.7.0 -
I have not tried other versions yet.

  was:
Minimal example reproducing the problem is set up as follows:
 1. Custom container view controller split into two halves each containing a CDVViewController
 2. Top half loads and after a delay (1000ms) fires a NSNotification
 3. In response to the NSNotification the top half loads a green page and the bottom half
loads a red page

Both red pages and green pages have an event listener for 'deviceready' which does the following:

{code}
function onDeviceReady() {
    alert('deviceready from XXXXX'); // colour here
    cordova.exec(null, null, 'Echo', 'echo', ['hello']);
};
{code}

Observed behaviour:
 - deviceready is fired only for the red page (bottom)
 - The cordova.exec succeeds for the red page (bottom)
 - deviceready is not fired for the green page (top)

The deviceready can be triggered by certain events for the top page:
 - Pulling down the notification bar
 - Backgrounding

If deviceready is triggered by pulling down the notification bar, the cordova.exec is still
not fired for the green page. The cordova.exec message is queued up and finally does go through
when the app is backgrounded.

This bug is remarkably similar to the following:
https://issues.apache.org/jira/browse/CB-2094

Perhaps it is an edge case which was overlooked? This bug reproduces on 2.3.0 and 2.7.0 -
I have not tried other versions yet.

    
> deviceready not fired and cordova.exec events queued up till backgrounding
> --------------------------------------------------------------------------
>
>                 Key: CB-3534
>                 URL: https://issues.apache.org/jira/browse/CB-3534
>             Project: Apache Cordova
>          Issue Type: Bug
>          Components: iOS
>    Affects Versions: 2.3.0, 2.7.0
>         Environment: Reproducible on iPhone/iPad 6.1 Simulator and Device.
>            Reporter: Mike Kwan
>            Assignee: Shazron Abdullah
>
> Minimal example reproducing the problem is set up as follows:
>  1. Custom container view controller split into two halves each containing a _CDVViewController_
>  2. Top half loads and after a delay (1000ms) fires a _NSNotification_
>  3. In response to the _NSNotification_ the top half loads a green page and the bottom
half loads a red page
> Both red pages and green pages have an event listener for *deviceready* which does the
following:
> {code}
> function onDeviceReady() {
>     alert('deviceready from XXXXX'); // colour here
>     cordova.exec(null, null, 'Echo', 'echo', ['hello']);
> };
> {code}
> Observed behaviour:
>  - _deviceready_ is fired only for the red page (bottom)
>  - The _cordova.exec_ succeeds for the red page (bottom)
>  - _deviceready_ is not fired for the green page (top)
> The _deviceready_ can be triggered by certain events for the top page:
>  - Pulling down the notification bar
>  - Backgrounding
> If _deviceready_ is triggered by pulling down the notification bar, the _cordova.exec_
is still not fired for the green page. The _cordova.exec_ message is queued up and finally
does go through when the app is backgrounded.
> This bug is remarkably similar to the following:
> https://issues.apache.org/jira/browse/CB-2094
> Perhaps it is an edge case which was overlooked? This bug reproduces on 2.3.0 and 2.7.0
- I have not tried other versions yet.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

Mime
View raw message