Several services, Same Android app

2019-09-15 05:02发布

问题:

I currently maintain an Android application which uses a big fat services handling :

  • Bluetooth communication (constant through App usage)
  • File compression
  • Http Request
  • Canvas saving (the app uses Samsung Pen SDK, with huge canvas to save)

I'd like to split the service into new namely services. Should I? Am I going to slow my app by using too much memory for those services? Is it going to be mess to maintain?

Thx in advance

回答1:

If managed properly several services can decrease memmory and CPU usage. If some part of the app needs only File compression- no point for it to use everything else. Also services does not use alot of resources by themselves- its important what you do inside.

Look at Intent Service They can be usefull for your File Compression and Canvas, while normal always running service is usefull for your Bluetooth communication(if its really needed all the time).