Which method runs code on the UI thread from a background thread inside an activity?
- runInBackground
- Thread.sleep()
- runOnUiThread
- startService()
Answer
C) runOnUiThread
runOnUiThread posts the block to the main thread.
Computer Science MCQ · More Threading and Publishing Android Applications MCQs · Practise