title: RunOnUIThread in Android with callbacks
body: <p>I'm developing an Android card game app and using <strong>smartfox</strong> client API in my project. When a user is playing game, smartfox server push responses to the client by invoking callbacks from back end and we need to manipulate app UI within these callbacks.</p>
  
  <p>Now we need to manage threading in these callbacks so that it does not block UI thread as well as all UI updates happens only in UI thread.</p>
  
  <p>We implemented <em>Activity.runOnUiThread(Runnable)</em> where ever we need to update UI. However this solutions doesn't seems to be much efficient. Sometime it works sometime not.</p>
  
  <p>Please share if you do have a better mechanism to handle this kind of situation.</p>