We use cookies to give you a better experience. Carry on browsing if you're happy with this, or read our cookies policy for more information.

Skip main navigation

Introduction to Interprocess Communication (IPC)

Introduction to Interprocess Communication (IPC)
© University of Southampton 2017
In this section, we introduce you to how to secure asynchronous and synchronous Interprocess Communication (IPC) in Android. In two exercises, you will also be encouraged to identify inadequate permissions using BuggyTheApp.

In software systems it is often the case that different processes need to communicate with one another in order to cooperate on some task. This is known as Interprocess Communication (IPC), and over the years many different mechanisms have been employed in order to perform IPC.
Android provides its own mechanisms for IPC, but it should be noted here that the name IPC is a bit of a misnomer on Android, as the Android IPC mechanisms are designed to operate at the level of components rather than processes. In other words a component in one app may use IPC to communicate with a component in another app, or with another component in the same app. Thus IPC in Android is a bit more general than the name would imply.

Asynchronous and Synchronous IPC

In general IPC can take one of two forms:
  1. Asynchronous: with asynchronous IPC the sender does not wait for the receiver to receive the message. The send function or method returns immediately, and then sometime later the receiver receives the message. If the message requires a response from the receiver, then the message may supply details of how the receiver can send a reply to the sender.
  2. Synchronous: with synchronous IPC the send and receive are synchronised, and often from the receiver’s perspective it appears like a normal method or function call, with any response from the receiver passed to the sender as the return value from the send function or method. With synchronous IPC, if the receiver is slow responding to the message the sender will block until the receiver responds. This is often undesirable in user interface components.
Android provides both asynchronous and synchronous IPC.
Note for Nerds: as Android under the hood runs on Linux, the traditional Linux mechanisms for IPC like network sockets and shared files are available, but their use for app development is discouraged.
© University of Southampton 2017
This article is from the free online

Secure Android App Development

Created by
FutureLearn - Learning For Life

Our purpose is to transform access to education.

We offer a diverse selection of courses from leading universities and cultural institutions from around the world. These are delivered one step at a time, and are accessible on mobile, tablet and desktop, so you can fit learning around your life.

We believe learning should be an enjoyable, social experience, so our courses offer the opportunity to discuss what you’re learning with others as you go, helping you make fresh discoveries and form new ideas.
You can unlock new opportunities with unlimited access to hundreds of online short courses for a year by subscribing to our Unlimited package. Build your knowledge with top universities and organisations.

Learn more about how FutureLearn is transforming access to education