Welcome!

Welcome to the official BlackBerry Support Community Forums.

This is your resource to discuss support topics with your peers, and learn from each other.

inside custom component

Web and WebWorks Development

Reply
Developer
ravi1989
Posts: 777
Registered: ‎07-21-2012
My Device: 9810

Show Splash screen until application load in android using phonegap

Hi
i want to show background image until application load in android,in first time i download from websersice so it take time around 10 sec . but i save this data on database so next time when application launch i want to show image only for 2 sec.How to do that .?

 

 

public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.main);
 super.setIntegerProperty("splashscreen", R.drawable.splash);
super.loadUrl("file:///android_asset/www/index.html",15000);


Thanks

Developer
Developer
LBP
Posts: 607
Registered: ‎04-29-2011
My Device: PlayBook 16GB, BB10 LE Z10 (red)
My Carrier: none

Re: Show Splash screen until application load in android using phonegap

Double post again and a hint: we are in BB WebWorks forum so I think getting answers can last longer than if you whould use an Android forum for your questions.

 

For the one you ask you need to understand the way your source code works:

 

super.loadUrl("file:///android_asset/www/index.html",15000);

This means to load the app 15 seconds after the splashscreen or show the splashscreen for 15 seconds and then go on with index.html. You can not really handle it to load index.html in that time since it is, as far as I know, a synchronous process to show splash and then refer to the index.html.


"Like" if you liked the post.
"Accept as Solution" if the post solves your question.