Reputation:
I want to show a background image until the application loads in Android, in the first time I make a download from webservice, so it takes around 10 sec. But I will save this data on database so next time, when application relaunch, I want to show the image only for 2 sec. How do I do that?
Thanks.
Upvotes: 1
Views: 3657
Reputation: 23273
I think my blog post explains it pretty well:
http://simonmacdonald.blogspot.com/2012/04/phonegap-android-splashscreen-just-got.html
basically you set the timeout to a long value and then call navigator.splashscreen.hide() from the javascript side when you want it to go away.
Upvotes: 4