Mark6753445
Posts: 0
Joined: Sat Mar 22, 2014 10:03 am

Launch image time setting

Hello

Is there any way of setting the launch image time please? The default appears to be approx 10 seconds but I would like this to be nearer 3 seconds.
I have added a javascript function to the project (as mentioned in another post) but this does not appear to be working so I guess this was for a splash screen page rather than the launch image.
This is the js I have added

setTimeout(function() {
navigateTo('startScreen');
}, 3000);

Any help would be greatly appreciated.
Thank you.

Igor
Posts: 0
Joined: Tue Apr 02, 2013 12:05 pm

Launch image time setting

Hello,

You can add alert() to make sure that your code is executed

pre
code
setTimeout(function() {
alert("Test");
navigateTo('startScreen');
}, 3000);
/code
/pre

Mark6753445
Posts: 0
Joined: Sat Mar 22, 2014 10:03 am

Launch image time setting

Hi Igor

Yes when packaged and run on my mobile, the pop up message appears after 3 seconds, click ok but the launch image still remains for a further 7 seconds (making the default 10 seconds). How do I change this please so the launch image is only on for 3 seconds and then goes to my start screen.

Thank you

Illya Stepanov
Posts: 0
Joined: Mon Mar 18, 2013 8:48 am

Launch image time setting

Hi Mark, on what device you testing? And where exactly you invoke this code?

Mark6753445
Posts: 0
Joined: Sat Mar 22, 2014 10:03 am

Launch image time setting

Hi Illya,

I am testing on HTC one and I added the code using create new javascript

I am trying to only make the launch image (attached picture) last for 3 seconds before going to my first page. Image

Thank you.

Illya Stepanov
Posts: 0
Joined: Mon Mar 18, 2013 8:48 am

Launch image time setting

Depending on your Library version used in project - you can make changes in config.xml file in the project's www directory as it described in PhoneGap Doc here: http://docs.phonegap.com/en/3.3.0/con...

Mark6753445
Posts: 0
Joined: Sat Mar 22, 2014 10:03 am

Launch image time setting

I cant seem to find the default time (10000) to change it? Where is this located as I may be looking in the wrong place.

SourceAndroidresXMLconfig.xml

Illya Stepanov
Posts: 0
Joined: Mon Mar 18, 2013 8:48 am

Launch image time setting

Mark, what Library version you have set in your project?

Mark6753445
Posts: 0
Joined: Sat Mar 22, 2014 10:03 am

Launch image time setting

I am running V2.0

Illya Stepanov
Posts: 0
Joined: Mon Mar 18, 2013 8:48 am

Launch image time setting

In this case please follow the PhoneGap doc, you need to add following line:
pre
code<preference name="SplashScreenDelay" value="10000" />/code
/pre

Return to “Issues”