I have an android application in which I subclassed Application class (defining MyApplication), and some Activities having a MyApplication instance as a member and relying on it for some global configuration variables and functions.
Now, what if I want to reuse one or more of the activities in another android application? I guess I can put the activities to be shared in both applications in an android library project, but what happens if I subclass Application class in my new application as well?
Will the two different instances of the two different Application subclasses be able to exist at the same time, will they create any trouble? Should I think about a totally different approach?
Yes this will not work.
solution (used to create a very robust framework)
In other words, each app that uses this library should create the Application class that implements
MyInterface