views:

904

answers:

4

Hello , i am developing one application in blackberry java development. I am requesting to http means i am connecting to web service .response of web service taking some time .That time i want to display some waiting screen.

Could you tell me how can i do that....

Regards Pankaj Pareek

A: 

Basically you need to start the network request in a background thread. Once the network operation is complete you should notify the main/UI thread to change the waiting screen into the results.

To notify the main thread have a look at the link below and search for invokeLater:
http://developers.sun.com/mobility/midp/articles/blackberrydev/

Word of advice: Don't spawn to many threads at once on mobile devices. Usually they have a really low maximum number of threads.

ruibm
A: 

I just found some posts that might be useful to you (if you haven't already seen them).

http://www.blackberryforums.com/developer-forum/63182-simple-please-wait-screen.html

Alex
A: 

Do one thing.... At the listner event of button write this.

UiApplication.getUiApplication().invokeLater(new Runnable(){ public void run(){ Status.show("Please Wait....",b,3600); message.setText(test(theFile)); } });

Pankaj Pareek