In the viewpoint of running code in the UI thread, is there any difference between:
MainActivity.this.runOnUiThread(new Runnable() { public void run() {
There is a fourth way using Handler
new Handler().post(new Runnable() { @Override public void run() { // Code here will run in UI thread } });