Want to keep learning?

This content is taken from the University of Southampton's online course, Secure Android App Development. Join the course to learn more.

Synchronous IPC in Android

In Android there are two situations where synchronous IPC is employed:

  1. Bound Services: a component can bind to a Service which will return an interface, and then using the interface, the component can invoke the methods of the Bound Service.

  2. Content Providers: a component can access a Content Provider by invoking methods on a Content Resolver object.

In both cases, the resulting method calls to the Bound Service or Content Provider (via the Content Resolver) are synchronous. This means the client component will block until the Bound Service or Content Provider completes the requested action, at which point the method invoked by the client component returns.

Notes for Nerds: in software systems, methods that appear as local calls, but that actually invoke a method in another process (possibly even on another machine) are known as Remote Procedure Calls (RPC). With RPC the system hides the communication details between the client and the process that performs the requested operation. The client “sees” what appears to be a conventional method call, but the method can throw additional exceptions as a result of communication failures etc.

Share this article:

This article is from the free online course:

Secure Android App Development

University of Southampton