Android traking the faster thread ends whitout frozen appl
===

I’m a android developer beginner, so I want to put 2 threads running simultaneously in background (or not), one is for testing Wifi connectivity, and another for timeout respond with progress bar( or another thing for showing that application is not dead),  in “main” I want to waiting, if wifi testing is faster than timeout, send user for one page, if timeout ran out, send user for different page.
I already have to threads, one doing timeout+progressBar and other checking connectivity, my problem is who to waiting for the fast thread that end, I tried with a loop checking for thread.isalive(), but in that way progress bar doesn’t show, and the application frozen until some thread ends… =\

any help?! Sorry my bad english...