The element also supports an android:process attribute, to set a .... doInBackground() and runs in the UI thread, so you can safely update your UI.
developer.android.com