title: Android ipc LocalSocket vs Binder (AIDL)
body: <p>I want every app to be able to send data to my service. Therefore I need inter process communication. Every page I can find proposes to use Messenger, AIDL or Intents (BroadcastReceiver). So far what I could figure out by building some test apps is that BroadcastReceiver is extremely slow and messages can get lost without notification if sending with multiple threads inside <code>while(true)</code> loop. AIDL and Messenger are not only complicated to implement (service is needed, binder,...) but can provide strange behavior for example when sending with multiple threads resulting in RemoteException (!!! FAILED BINDER TRANSACTION !!! ) with AIDL just when using oneway keyword. I want to ensure that delivery is guaranteed. Is there even a reason to use <code>oneway</code> when delivery should be guaranteed?</p>
  
  <p>Nevertheless, LocalSocket seems to be extremely easy to use (no need for a service, works just like java socket). Client apps could just open a LocalSocket, connect to the provided address and then <code>while(true) outputstream.writeObject();</code></p>
  
  <p>Are there any downsides when using LocalSocket because the android developer page says "Some apps attempt to implement IPC using traditional Linux techniques such as network sockets and shared files. We strongly encourage you to instead use Android system functionality for IPC" but does not further comment on this</p>