Skip to content

Instantly share code, notes, and snippets.

@yanguango
Last active May 15, 2016 18:38
Show Gist options
  • Star 2 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save yanguango/971946 to your computer and use it in GitHub Desktop.
Save yanguango/971946 to your computer and use it in GitHub Desktop.
public class MyApplication extends Application {
private static MyApplication singleton;
public static MyApplication getInstance(){
return singleton;
}
@Override
public void onCreate() {
super.onCreate();
singleton = this;
}
}
@becherurazvan
Copy link

public static MyApplication getInstance(){
return singleton;
}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment