My app loads up a json feed and a webview, the url of the webview is taken from the webview. I cannot show anything until both of these are loaded, therefore I am using a splash screen. My problem is that my webview connects to a socket.io server using XHR-Long Polling. Therefore, my webview thinks that it is still loading data, and never fires the onPageFinished event, which is where I was previously dismissing my dialog, before I added socket.io. This means that the splash screen never dismisses.
Where can I put my .dismiss() so that it only dismisses once everything is loaded? Is there anything I can do to make the webview think it has loaded the page? My question is basically, what is the best way to handle this?
Thanks