Skip to content
This repository has been archived by the owner on Jul 8, 2020. It is now read-only.

Phonegap/Cordova: Delayed starting of application do not work for me #94

Open
colegatron opened this issue Jan 3, 2013 · 0 comments
Open

Comments

@colegatron
Copy link

I use phonegap and need to open the camera app the very first thing in the application, I did not faced this problem before because phonegap calls are not usually done at the very beggining of the app startup.

I have created a function onDeviceReady() { alert("fired"); myapp.app.main(); }

Adding a document.addEventListener('deviceready', onDeviceReady, false); the event is fired and the alert displayed BUT the aplication does not displays on screen. I get a blank screen even when code inspector shows the jquerymobile tags.

After remove the addEventListener, I wrote in body tag a onDeviceReady();
Reloaded and it worked.

Then I removed the onDeviceReady from the body
Realoaded and obviously the app is not displayed.
Then from the javascript console run: 'onDeviceRead()' and then it NOT worked.

I have tried in a SamsungGalaxy (using weinre for debugging) and on Chrome in the laptop (using both chrome and weinre consoles).

Seems a problem with the delay between the page load and the app starting.

Perhaps something to do with jquerymobile ?

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

1 participant