You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@cordova.apache.org by "Mike Kwan (JIRA)" <ji...@apache.org> on 2013/05/29 15:33:22 UTC
[jira] [Created] (CB-3534) deviceready not fired and cordova.exec
events queued up till backgrounding
Mike Kwan created CB-3534:
-----------------------------
Summary: 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.7.0, 2.3.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:
function onDeviceReady() {
alert('deviceready from XXXXX'); // colour here
cordova.exec(null, null, 'Echo', 'echo', ['hello']);
};
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