Android does not allow to access the UI from a worker tread.
This shows how to access the UI thread from a Worker thread. The following are some methods to access the UI.thread:
Activity.runOnUiThread(Runnable)
View.post(Runnable)
View.postDelayed(Runnable, long)
- implement a canclation flag
- exit run