Dianne, Thanks for the advice. AsyncTask seems to be a popular recommendation. For some reason when I first read about it, I was turned away by the fact that it could only be called once. I actually ordered a book on concurrency yesterday, so hopefully I can get a better handle on multthreading.
Mark, I took your advice and moved the Socket instantiation into the run() method. Now it no longer locks up the UI thread. Thanks for that tidbit of wisdom. In the near future, I intend to create a small project to test the UI Thread lockup from my splash screen. I'm still not sure why I couldn't thread the start up of the service from the Activity and get the same results. Thanks, J On Fri, Apr 9, 2010 at 12:54 PM, Dianne Hackborn <[email protected]>wrote: > I strongly recommend using IntentService, which takes care of the threading > for you. Unless you are good at multithreading (I will claim that 90% of > developers are not) then it is a good idea to stay away from Thread and use > some higher-level facilities like IntentService, AsyncTask, etc. > > > On Fri, Apr 9, 2010 at 7:40 AM, Mark Murphy <[email protected]>wrote: > >> Jason LeBlanc wrote: >> > Yes, the Connection extends Thread. >> >> Then be sure not to do anything time-consuming in the Connection >> constructor. Put the time-consuming stuff in run(). In this case, that >> includes opening your socket connection, because while it might not be >> time-consuming normally, it will be if it cannot resolve DNS, etc. >> >> > If I start a Thread in an Activity, does that Thread need to complete >> > execution before I can transition to the next Activity? >> >> No. >> >> -- >> Mark Murphy (a Commons Guy) >> http://commonsware.com | http://twitter.com/commonsguy >> >> Warescription: Three Android Books, Plus Updates, One Low Price! >> >> -- >> You received this message because you are subscribed to the Google >> Groups "Android Developers" group. >> To post to this group, send email to [email protected] >> To unsubscribe from this group, send email to >> [email protected]<android-developers%[email protected]> >> For more options, visit this group at >> http://groups.google.com/group/android-developers?hl=en >> >> To unsubscribe, reply using "remove me" as the subject. >> > > > > -- > Dianne Hackborn > Android framework engineer > [email protected] > > Note: please don't send private questions to me, as I don't have time to > provide private support, and so won't reply to such e-mails. All such > questions should be posted on public forums, where I and others can see and > answer them. > > > -- > You received this message because you are subscribed to the Google > Groups "Android Developers" group. > To post to this group, send email to [email protected] > To unsubscribe from this group, send email to > [email protected]<android-developers%[email protected]> > For more options, visit this group at > http://groups.google.com/group/android-developers?hl=en > -- You received this message because you are subscribed to the Google Groups "Android Developers" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/android-developers?hl=en

