I'm using extending application class on Android to share my data across the entire app.
I can use getApplication()
method from all my activities.
However, there are certain custom helper classes I created; for example, an XMLHelper
class which does not inherit from any activity / service class.
Here the getApplication()
method is not available.
How do I sort this out and what are the best design practices to solve this?
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…