0

Is there some kind of native loading screen for each os available in phonegap?

I know there is a javascript loading screen when phonegap is loaded but before that, when you start your application, it can be really slow... For example, in android, I could imagine an asynctask showing a load screen or displaying some interesting data until all the js libs are loaded.

Anyone has seen something like this?

Thanks

Sephy
  • 50,022
  • 30
  • 123
  • 131

3 Answers3

5

Native loading screen aka "splash screen":

build.phonegap.com supports this (as mentioned in the answer from iliha139) during the build process. But what if you want a splash screen without using the build service?

You have to solve it platform specifically:

iOS and WP7 supports native splash screen (displayed by the OS), while in Android the DroidGap class is displaying the splash screen. Therefore you still see an empty activity on Android when the application starts until the DroidGap activity becomes active.

Community
  • 1
  • 1
ChrLipp
  • 15,526
  • 10
  • 75
  • 107
  • I'm using the builder but i can't get it to work. I added the xml line gap:splash but I think the builder doesn't find the config file or the image. Is there a specific location for each of them ? – Sephy Jan 23 '12 at 10:49
  • I don't use the build service, I take the manually approach. They just want your web assets and provide the including code, this means that you can't add plugins. You can see the structure in the sample project on https://github.com/phonegap/phonegap-start. If you started on Android, you have to upload the assets/www folder. The config.xml should be on the root, the splash is referenced relative to it. – ChrLipp Jan 23 '12 at 11:13
0

on ios you can use https://github.com/Initsogar/cordova-activityindicator phonegap plugin which is very good . You can use this for androi also .

But for android there is easiest way navigator.notification.activityStart(); . you can see its usage here : http://javacourseblog.blogspot.ro/2014/02/show-loading-screen-in-phonegap-app.html

Ashisha Nautiyal
  • 1,389
  • 2
  • 19
  • 39
0

Yes, there is. Check this https://build.phonegap.com/docs/config-xml.

For example for iOS just put the splash screen image in Resources/splash with name Default.png.

ilija139
  • 2,925
  • 3
  • 20
  • 23
  • Thanks for your answer, I'll test that as soon as possible and come back to you. – Sephy Jan 17 '12 at 15:59
  • I'm still working on this, I haven't forgotten you, though I tried putting the default png as you suggested but it didnt work. I'll have a look at the config file as soon as possible. – Sephy Jan 20 '12 at 15:10
  • The default png only works if you used the phonegap template when you create the xcode project. I'm not sure if they changed the template or in what version it worked. – ilija139 Jan 20 '12 at 20:12