Android: determining the current context for displaying a warning

I call the ZXing scanner from screen-A using Intent s. Once the scan is complete, control will return, of course, to the code behind screen-A, and I will do some other work before calling Screen-B.

The problem is that during this period of work the screen is black, and I can’t determine the appropriate context for the display of the “working ...” Toast / msgbox. Any help or suggestions?

+1
android multithreading android-intent android-context offloading
Apr 21 '09 at 20:53
source share
2 answers

Execute your “ work period ” in your own thread , while this thread runs in the background, Android will transfer Screen-A control on which the ProgressBar will be displayed. In the "work period" thread, messages will be transmitted to screen-A, updating the value of the variable that measures progress. Here is a good place for beginners with Android threads:

http://developer.android.com/guide/appendix/faq/commontasks.html#threading

+1
May 03, '09 at 20:19
source share

Can you display the ProgressDialog before calling ZXing and then release it in onActivityResult() ?

0
Apr 22 '09 at 21:21
source share



All Articles