Skip to content

Instantly share code, notes, and snippets.

@mladenrakonjac
Created September 13, 2016 09:49
Show Gist options
  • Save mladenrakonjac/b457f92d163a9e16ab29d7e2b2fce53d to your computer and use it in GitHub Desktop.
Save mladenrakonjac/b457f92d163a9e16ab29d7e2b2fce53d to your computer and use it in GitHub Desktop.
Application class for Android projects
public class NameOfApplication extends Application {
private FirebaseAnalytics mFirebaseAnalytics;
private static NameOfApplication mInstance;
@Override
public void onCreate() {
super.onCreate();
mInstance = this;
}
public static synchronized NameOfAplication getInstance() {
return mInstance;
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment