What is this post about:
This post describes how to establish a reliable connection to AIDL Service running in a different process in Android. The following questions are addressed in this post:
- How bound IPC Service connection's life-cycle is different from life-cycle of the Service itself?
- What is the exact life-cycle of a connection to bound IPC Service?
- How can we account for connection's life-cycle when writing clients of bound IPC Services?
Source code of IpcServiceConnector
class, which can be employed in order to establish and manage reliable connections to bound IPC Services is provided, and a tutorial implementation of a client
which uses this class in order to establish a crash-and-kill-tolerant connection to bound IPC service is presented.