Page 1 of 2
Launch image time setting
Posted: Sat Mar 22, 2014 2:16 pm
by Mark6753445
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.
Launch image time setting
Posted: Sat Mar 22, 2014 2:33 pm
by Igor
Hello,
You can add alert() to make sure that your code is executed
pre
code
setTimeout(function() {
alert("Test");
navigateTo('startScreen');
}, 3000);
/code
/pre
Launch image time setting
Posted: Sat Mar 22, 2014 2:53 pm
by Mark6753445
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
Launch image time setting
Posted: Sat Mar 22, 2014 3:36 pm
by Illya Stepanov
Hi Mark, on what device you testing? And where exactly you invoke this code?
Launch image time setting
Posted: Sat Mar 22, 2014 3:39 pm
by Mark6753445
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.
Thank you.
Launch image time setting
Posted: Sat Mar 22, 2014 3:51 pm
by Illya Stepanov
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...
Launch image time setting
Posted: Sat Mar 22, 2014 4:47 pm
by Mark6753445
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
Launch image time setting
Posted: Sat Mar 22, 2014 5:37 pm
by Illya Stepanov
Mark, what Library version you have set in your project?
Launch image time setting
Posted: Sat Mar 22, 2014 5:43 pm
by Mark6753445
Launch image time setting
Posted: Sat Mar 22, 2014 5:51 pm
by Illya Stepanov
In this case please follow the PhoneGap doc, you need to add following line:
pre
code<preference name="SplashScreenDelay" value="10000" />/code
/pre