Skip to content

Instantly share code, notes, and snippets.

@muratcanbur
Created August 23, 2015 09:00
Show Gist options
  • Save muratcanbur/36aa2a8660bd0700150e to your computer and use it in GitHub Desktop.
Save muratcanbur/36aa2a8660bd0700150e to your computer and use it in GitHub Desktop.
public class App extends Application {
private static final AtomicReference<App> INSTANCE = new AtomicReference<>();
public static Context getContext() {
return INSTANCE.get();
}
@Override
public void onCreate() {
super.onCreate();
INSTANCE.set(this);
StethoUtil.init(this);
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment