title: Android - How to decide whether to run a Service in a separate Process?
body: <p>I am working on an Android application that collects sensor data over the course of multiple hours. 
  For that, we have a Service that collects the Sensor Data (e.g. Acceleration, GPS, ..), does some processing and stores them remotely on a server. </p>
  
  <p>Currently, this Service runs in a separate process (using <em>android:service=":background"</em> in the manifest). This complicates the communication between the Activities and the Service, but my predecessors created the Application this way because they <strong>thought</strong> that separating the Service from the Activities would make it more stable. </p>
  
  <p>I would like some more factual reasons for the effort of running a separate process. What are the advantages? Does it really run more stable? Is the Service less likely to be killed by the OS (to free up resources) if it's in a separate process?</p>
  
  <p>Our Application uses <a href="http://developer.android.com/reference/android/app/Service.html#startForeground(int,%20android.app.Notification)" rel="noreferrer">startForeground()</a> and friends to minimize the chance of getting killed by the OS. </p>
  
  <p>The Android docs are not very specific about this, the mostly state that it depends on the Application's purpose ;-)</p>
  
  <p><strong>TL;DR</strong> What are objective reasons to put a long-running Service in a separate process (in Android)?</p>