Just ironed out a bug in my Android app. I was trying to use getAssets() to pull a file from my assets directory. I subclassed Application and returned a "getApplicationContext" object so that all my classes can use a context whenever they need to.
But after much headache and NullPointerExceptions, it turns out that I needed to pass a local context variable and use THAT instead. If I use a global application context, getAssets doesn't work!
So why is this? What's so special about a local context variable that makes it work. I thought any old "Context" variable was enough to access the necessary methods and make them work properly!