Created
November 25, 2017 15:33
-
-
Save hi-manshu/269fe1a99122349b4ae34cfb97737d5c to your computer and use it in GitHub Desktop.
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 ApplicationInit extends Application { | |
private static Context context; | |
private static ApplicationInit mInstance; | |
@Override | |
public void onCreate() { | |
super.onCreate(); | |
ApplicationInit.context = getApplicationContext(); | |
SharedPreference.init(getApplicationContext()); | |
mInstance = this; | |
} | |
public static Context getAppContext() { | |
return ApplicationInit.context; | |
} | |
public static ApplicationInit getInstance() { | |
return mInstance; | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment