We have an android application. Up until now, we have built it in house. But because of the significant increase of business requirements, we are thinking of a possibility to outsource some development to third party to offload some of the work.
The challenge is, we don't want them to hold the entire source code. So ideally, they should only have the code for feature they are working on.
We are thinking that they might be able to create a module, and perhaps compile it to an aar library that can be integrated by ourselves at later time.
But we then realize that we have a certain class, namely a BaseActivity, which is a superclass of all the Activities we had. The main purpose of this class is to handle common events that might pop up on any screen, and also for routing for activities that should be reachable from every menu (such as home screen), or to handle cases such as when the session is expired; which will redirect the user to login screen wherever he may be at the time.
We want to give them this class, as we don't want everyone to invent their own approach of event and error handling, and routing for every new module, which can break things and cause maintenance headache in the future. But, because it depends on other activities for routing (needed for composing intent), such as LoginActivity, we'll need to give them the Login class as well, which in turn depends on event more activities, and in the end, essentially we give them everything.
How can we decouple this? Is the idea possible at all? One idea that come to mind is to use Class.forname() for composing intent rather than using the ClassName.class reference. But I'm not sure if that is the correct approach.
Thanks.