1

I need to update UI in OKHttp's request callbacks, the callbacks run in worker thread by default. How can I run them in UI thread?

I know of activity.runOnUIThread(), but I don't have any references to any activity in the callbacks.

NeoWang
  • 17,361
  • 24
  • 78
  • 126
  • 1
    check this [answer by elltz](http://stackoverflow.com/questions/28226320/changing-ui-from-thread/28226646#28226646) _don't forget to honor it_ :) – Elltz Feb 04 '15 at 03:30
  • It works. I have upvoted your answer in that thread, thanks! – NeoWang Feb 06 '15 at 14:22

0 Answers0