I currently have a remote service that communicates constantly with an activity on the same app.
I need to send messages in and out extensively at some times. Which method of messaging is better, faster, and battery friendly? Using messages or aidl interface?
As of now I’m using aidl interface but for some reason I think there is a lot of overhead specially when attaching listeners…
Any feedback greatly appreciated.
A remote services is generally not a good idea.
Then use less memory. A audio player should not need to exceed the per-process RAM limits, even with activities.
This is not a particularly good reason for wasting device RAM and CPU time. That’s a fine approach for a server, less so for an embedded system.
They should be fairly comparable. IPC considerations should swamp most other effects. For example, quoting myself from one of my books:
That being said, if you are concerned about the overhead (yet insist on the remote service), you are probably better served trying both and using logging to determine if there is a clear winner.