For example, I am doing the following and then later referencing the applicationContext from within all of my inner classes.
public class MobileApplication extends Application {
public static Context appContext;
@Override
public void onCreate() {
super.onCreate();
appContext = getApplicationContext();
}
}
Future class,
public class RandomClass {
public void doSomething() {
MobileApplication.appContext.toString();
}
}
I am not sure of the drawbacks of doing something like this VS passing in my context every single time i need one.