Thread
#android-architecture
    r

    Rahul Ch

    2 years ago
    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.
    u

    ursus

    2 years ago
    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
    r

    Rahul Ch

    2 years ago
    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?
    u

    ursus

    2 years ago
    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