0

I am building multiprocess Android application. One of my processes contains only a remote service. Is it ok to block main thread of this process assuming there will be no activity launched and the service isn't multithreaded? This process hasn't any ui (except for one Toast shown for 3 seconds). Note that every Android process has it's own main (ui) thread. So should I do my work in background there or is the main thread enough?

user221256
  • 415
  • 5
  • 14
  • @pskink Yes, it is good practice when the service is independent of ui and should run even when ui is not visible. The ui process could be killed (by system) leaving the service running. It also reduces memory usage a lot. – user221256 Feb 01 '18 at 20:16
  • @pskink That would be a lot of AIDL for one service – user221256 Feb 01 '18 at 20:43
  • @pskink I know, I just said why services aren't in another process by default. Can't you just answer my question? – user221256 Feb 01 '18 at 20:56

0 Answers0