I am totaly new to android and just want to know if it is any working and possible way to update the UI outside the main thread. Just from my code I have listed below I know
Only main thread can update UI. If your thread want to update UI, use activity.runOnUiThread()
However your action is just queued to run in UI thread(if you are running it not from UI thread), which mean it can update UI a little bit later.
http://developer.android.com/reference/android/app/Activity.html#runOnUiThread(java.lang.Runnable)