How to separate Service and Activity in Android MVP architecture?

Viewed 882

I am working on Android Music-Player. I am using Service to play songs, SQLite Database to store songs, and ContentProvider to access sqlite database. I am confused, how can I maintain connection between service and activity? Should I implement connection between presenter and Service? As I am planning to consider my Service as Model, what will be the best and easiest approach to do that?

1 Answers

Take a look at the approach described here - it should help you with decoupling your service from your activity in an MVP architecture.

Related