Created
September 13, 2016 09:49
-
-
Save mladenrakonjac/b457f92d163a9e16ab29d7e2b2fce53d to your computer and use it in GitHub Desktop.
Application class for Android projects
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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