title: Why does Android Bound Services documentation suggest IBinder can't be used across processes?
body: <p>From <a href="https://developer.android.com/guide/components/bound-services.html" rel="nofollow noreferrer">https://developer.android.com/guide/components/bound-services.html</a>:</p>
  <blockquote>
  <p>If your service is private to your own application and runs in the same process as the client (which is common), you should create your interface by extending the Binder class and returning an instance of it from onBind(). The client receives the Binder and can use it to directly access public methods available in either the Binder implementation or the Service.</p>
  <p>This is the preferred technique when your service is merely a background worker for your own application. The only reason you would not create your interface this way is because your service is used by other applications or across separate processes.</p>
  <p>If you need your interface to work across different processes, you can create an interface for the service with a Messenger...</p>
  </blockquote>
  <p>This seems to imply you wouldn't use Binder for inter-process communication, but <a href="https://developer.android.com/reference/android/os/IBinder.html" rel="nofollow noreferrer"><code>IBinder</code> documentation</a> says the opposite:</p>
  <blockquote>
  <p>Base interface for a remotable object, the core part of a lightweight remote procedure call mechanism designed for high performance when performing in-process and cross-process calls. This interface describes the abstract protocol for interacting with a remotable object. Do not implement this interface directly, instead extend from Binder.</p>
  <p>The key IBinder API is transact() matched by Binder.onTransact(). These methods allow you to send a call to an IBinder object and receive a call coming in to a Binder object, respectively. This transaction API is synchronous, such that a call to transact() does not return until the target has returned from Binder.onTransact(); this is the expected behavior when calling an object that exists in the local process, and the underlying inter-process communication (IPC) mechanism ensures that these same semantics apply when going across processes.</p>
  </blockquote>
  <p>And <a href="https://developer.android.com/reference/android/os/Binder.html" rel="nofollow noreferrer"><code>Binder</code> documentation</a>:</p>
  <blockquote>
  <p>You can, however, derive directly from Binder to implement your own custom RPC protocol or simply instantiate a raw Binder object directly to use as a token that can be shared across processes.</p>
  <p>This class is just a basic IPC primitive...</p>
  </blockquote>
  <p>Many other pages also mention binders in IPC context. What am I misunderstanding?</p>