Question

I'm currently working on an application wich will do four things via web services : - receiving task assignment - sending results of assigned tasks - receiving picture concerning assigned tasks - sending pictures taken from the phone's camera

I was wondering the best way to achieve it : one IntentService which handles four different Intent types or four IntentServices that handles just one Intent.

Do you have any suggestion ?

Was it helpful?

Solution

if the tasks do not relate to each other and do not require an order of implementation, then you should go with 4 intent services, 1 service for each type of operation. However, if your tasks relate to each other (dependent on execution order) then its more reasonable to write one intent service, though you may achieve this with 4 different services too.

In short, it depends on how you want to modularize your code and make it easier to debug in future

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top