Skip to content

Instantly share code, notes, and snippets.

@blangel
Created November 18, 2013 16:32
Show Gist options
  • Select an option

  • Save blangel/7530868 to your computer and use it in GitHub Desktop.

Select an option

Save blangel/7530868 to your computer and use it in GitHub Desktop.
LocationService onCreate
this.looper - new AtomicReference<Looper>();
this.thread = new Thread(new Runnable() {
@Override public void run() {
Looper.prepare();
LocationService.this.looper.set(Looper.myLooper());
handler = new Handler(Looper.myLooper());
Looper.loop();
}
}, "Dash-Location-Looper");
this.thread.start();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment