dimanche 20 mai 2018

Android: MVP how does the model communicate back with the presenter?

My question is: When I'm doing some business in the model, How can send data back to the presenter depending on a callback method such as onSuccess?

I'm simply try to implement a Facebook login while using the MVP design pattern. First I was confused as how to register the callback manager outside of the view as I need the context. I decided to inject the context in the model, which is not a good practice as I under stood, the model should not have any android components.

Aucun commentaire:

Enregistrer un commentaire