Skip main navigation
We use cookies to give you a better experience, if that’s ok you can close this message and carry on browsing. For more info read our cookies policy.
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.

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

Contact FutureLearn for Support