I have an application that is driven by a configuration XML: various app properties are loaded at the app start-time by parsing the XML and initializing static variables of some class. The data read from this XML drives different Activities of the application. Presently, I have called the "parsing and the properties-initialization" from the onCreate() of my Main Activity.
I have a few questions as regards this case/approach:
Should I invoke the app initialization method from the Application Object or is the current approach correct? What advantages/ disadvantages do/would we get/have if I choose to invoke it from the Application object?
Do we really need a static class to store app properties? Or can we have all the properties as a static Collection variable in the application object?
Parsing a XML(~200 nodes) at app load time might take some time(not sure how long tho); How can I avoid the dreaded ANRs? I am using a Pull Parser.
Please help me find answers to these questions.
Thank you.