two classes extend Application
- One class I've registered in the Manifest and am using as an
Applicationis meant to be - Second class is my utilities class. It does lots of I/O and has a few helper methods. For I/O you need context (getAssets etc), so I reluctantly extended Application.
Note:
Everything is working as it should.
My Question:
Are there any drawbacks of using multiple Application classes? Is this even advised?
A few thoughts:
- Like what would happen if I had onCreate and other callback methods defined in both the classes?
- How do I register them both in the manifest even? etc
PS: I know I can just use a field to store context in the second class.
getApplicationContext. Helper class is helping with I/O, so it is manipulating Resources.