Skip to content

Instantly share code, notes, and snippets.

@jdamcd
Last active September 22, 2015 20:52
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
Star You must be signed in to star a gist
Save jdamcd/980f6776c2c35138b654 to your computer and use it in GitHub Desktop.
new Thread() {
public void run() {
Process.setThreadPriority(Process.THREAD_PRIORITY_BACKGROUND);
final String result = Example.blocking();
runOnUiThread(new Runnable() {
@Override
public void run() {
updateUi(result);
}
});
}
}.start();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment