Question

So, ive got to run multiple services for different tasks. Though, the repeating values are the same. That means the services are sending broadcasts every x seconds (they ve got the same x) . Now : what is more efficient to the system / battery : running multiple services, or put them in one, which causes the service to also send data which is not always used in the receiving activities (bigger intents which are broadcasted every x seconds) Thanks in advance

Was it helpful?

Solution

IMHO services are more memory and CPU expensive that sending broadcasts. If I had small data to send (which should be the case if you use intents), I would wrap them all together into one intent's extras in one service to avoid excessive CPU & ram overhead.

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