This is a general Java question and not an Android one first off!
I\'d like to know how to run code on the main thread, from the context of a secondary thread. For e
In case you are on Android, using a Handler should do the job?
new Handler(Looper.getMainLooper()).post(new Runnable () { @Override public void run () { ... } });