Skip to content

Instantly share code, notes, and snippets.

@pwittchen
Created March 2, 2014 22:09
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save pwittchen/9314754 to your computer and use it in GitHub Desktop.
Save pwittchen/9314754 to your computer and use it in GitHub Desktop.
GenericApplication class
public class GenericApplication extends Application {
private static Application instance;
@Override
public void onCreate() {
super.onCreate();
instance = this;
}
public static Context getContext() {
return instance.getApplicationContext();
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment