When my mobile web app (which runs inside of PhoneGap) starts up, it performs a request for data from the server. The problem is that the screen stays black while it is performing this request. When this request is performed at any time other than at startup, the app shows a loading dialog to give the user some feedback that something is loading but on startup, it's not behaving in that way.
I am performing the request in a pageshow
event handler.
Here is the code:
$("#home").on("pageshow", onHomeShow);
...
function onHomeShow() {
syncData();
}
function syncData() {
// show loading dialog and get the data here
}
Any and all help would be greatly appreciated. Thanks in advance.