Skip to content

Instantly share code, notes, and snippets.

@namchuai
Last active August 14, 2017 15:42
Show Gist options
  • Save namchuai/0a1de2437a79d2cb1dbb9336731b7c96 to your computer and use it in GitHub Desktop.
Save namchuai/0a1de2437a79d2cb1dbb9336731b7c96 to your computer and use it in GitHub Desktop.
public class ConsumerThread extends Thread {
@Override
public void run() {
Looper.prepare(); // (1)
// Handler creation should be placed here
Looper.loop(); // (2)
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment