My team is working on an Android project which consists of several Android applications which exchange data (on the same phone). The idea is to have several applications which are collecting some data and send this data to the main application. The main challenge here is to do the exchange as cheap as possible in terms of CPU load & battery usage.
As far as I know, there are two ways to achieve inter-process communications:
- Intents & activities - one activity catches the intents of another
- Remote methods (through AIDL)
I wonder which of these is more efficient in the following scenarios:
- Very frequent messages/method calls with very little data sent/traffic (e.g. just passing a bunch of primitives)
- Less frequent messages/method calls with large traffic chunks (e.g. collect data and periodically send a few KB/MB of data)
- Very frequent messages/method calls with large data chunks exchanged
I would appreciate any help, either in terms of comparison or a reference/link to a benchmark.