I know you’re not supposed to include slow-acting code on your UI thread in Android applications, but I’m not really sure what constitutes slow and what constitutes fast.
My application includes a permanent TCP Client connection to an external server. Up to now, I haven’t made any serious efforts at configuring its related code to run on secondary threads, and it seems to be working well enough.
Does anybody have strong feelings one way or the other about how an Android application should interact simultaneously with a user and an external TCP Server??
Thanks,
R.
In Android(or other platforms) the main thread is the UI Thread. This is because the user would always expect good responsiveness while using an application. If you overload this thread with any time consuming tasks, it will appear to the user that the app has frozen. This is against all Design guidelines, and you should definitely start separating your network connections from the main thread.