I have been developing Android apps for several years. I recently used the MVP architecture in my application and after reading and using this Android10 github repo many times.
But there are a few questions that I have around this MVP architecture that I am looking for. Please help me understand them better.
1) So, I have three modules of the application, domain, data. Which host modules will go. In some application, you have this in the domain, but I saw that some other libraries have it in the presentation or application module, for example https://github.com/android10/Android-CleanArchitecture .
2) Can presenters have Android-related products like Intents, Contexts, SharedPrefs ets? I do not think this should happen.
3) Can the data module talk to the application module and vice versa. Or the application module must talk to the domain module, which in terms of doing things in the data module.
4) How can I make a social login like Facebook with MVP architecture ... any idea or link for an explanation? I have done it below:
Activity: onFBButtonClick() → presenter.onButtonClick() → FacebookLoginManager.registerCallback
After that, I directly receive my activity onActivityResult(int requestcode, int resultcode, Intent intent) on onActivityResult(int requestcode, int resultcode, Intent intent) . Now, according to the fb sdk tutorial, I need to call FbCallbackManager.onActivityResult(with all the params) . But I can not convey this information in the presenter, because the presenter does not need to know about the intention (Platform Specific). How can I now call FbcallbackManager.onActivity() ?