Hi guys, I want to create a modular android app. The interaction to each module should be from the main App. For example If the Login module is called and once its job is done it should send back response to main app and main app should decide which module to be called...
What is best architecture that I should follow to achieve this? Something like Uber Ribs.
05/02/2020, 2:10 AM
If your app module is calling it, then there is no difference, as app module sees everything. Tricky part is communicating between modules. I suggest you dont use Uber Ribs, or rather, not yet, its complicated framework, and you have to go full buy in
05/02/2020, 3:25 AM
Ok but how do I communicate back to main app from the module when the modules job is done.... can I use interface or a broadcast to do that?
05/03/2020, 5:16 AM
The way youre describing it, theres is no difference if they are different modules or not. Yes use a callback interface, so your worker class doesnt know who calls it
or broadcast, or rx, doesnt matter. Just dont hardcode it calling a exact method on something from app module. And you cannot even do that if it is a different module, so youre forced to do the right thing