The following schema has been touted as the way to get application context from anywhere within my android app. But sometimes doing MyApp.getContext() returns n
instance is never initialized and so has a default value of null. This means that instance.getContext() will throw a NullPointerException. To fix this, you need to initialize the instance variable.