Several services, Same Android app

拟墨画扇 提交于 2019-12-12 04:33:15

问题


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).



来源:https://stackoverflow.com/questions/40241607/several-services-same-android-app

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!