Mes Mes - 10 months ago 87
Android Question

Start a Service using MVP pattern

I've been reading about

and I'd like to ask a few questions :

In my project I use lots of
s to make some network calls. I am guessing that those services belong to
layer of my app. But since they have a reference to context I'm not sure how I have to do it.
Should I just create another class
and in there start the
? Maybe add all those services in a
Dagger 2

I found a similar question here but there's no answer to it.

Answer Source

Just keep ApplicationContext in model classes, it's completely safe. You can read more about abilities of application context here
The two main advantages of MVP are testability and layer separation. If you can easily create unit tests for your presenters and models, you're doing right