Reputation: 169
I am currently working on an application designed for runners. Functionality of my app depends on 3 services: Bluetooth, Gps, Training. Bluetooth and Gps starts with an app and goes foreground together with foreground training service. My question:
Is there a limit here regarding how many such services I can add? Will having more services that can work also in foreground make my application too resource consuming? As far as i know the most popular apps use only one service to manage tasks which i mentioned.
Upvotes: 1
Views: 565
Reputation: 133
Is there a limit here regarding how many such services I can add?
No limit.if memory enough and you willing to handle data exchange.
Will having more services that can work also in foreground make my application too resource consuming?
Resource consuming depends on your actual code.Empty service less resources are consumed(Far lower than activity or fragment,because no ui).
As far as i know the most popular apps use only one service to manage tasks which i mentioned.
Foreground service must show a notification,so you not should tell user you is using gps,system is already working on it.
Users may think that you are wasting their phone's battery, even though you may not have done so.
so you can do,but I suggest you use a service that calls three modules. of course if you need upload or other service,you should run new service.
Upvotes: 0