I need the Android Context on boot (as in when I initialize the game and load models) to be able to load data from an SQLite database running on the native Android framework.
I currently have this code: (appClass is also initialized before this, but this is the relevant part. I use SimpleApplication and AndroidHarness):
game = (Game)app;
The problem is that the context is added to the class after it is initialized and has gone through simpleInitApp.
I tried adding the initialization stuff into the init method, but that gives a NullPointerException on assetManager, so that is something I cannot do. Using static on the Context field shows a warning because it is a memory leak to have Context in a static field (which I don't want because I don't want to waste memory. Considering it is already limited, it is important to make the best of the assets).
So any ideas how I can have the ANdroid context included in the application from the first boot?