mardi 5 juin 2018

Which architectural pattern should be, if there is no activity and only Service based application on Android

I'm developing an sdk. It's service based and there is a singleton manager class. I'd like to refactor the code, it was written before than me. I've started with splitting dependencies from classes. But There is also big problem in front of me about architectural pattern. Let'me try to explain my usecase.

Broadcast Receiver(for Phonecall) > starts a Service(listens phone state) > starts another service to show UI(on system dialog)..

when the first service needs to update the state of second service, localbroadcastmessaging works for it.

On the other hand, I've another service that connects the network and fethces the data.

There would be two different pattern implementations for services..

I need to create a pattern like,.. Model-Service-Presenter-Service-View. ? :)

What would you suggest me? I couldn't find the proper way to refactor it.

Aucun commentaire:

Enregistrer un commentaire