title: Android: Foreground service vs. wakeLock
body: <p>I am relatively new to Android, so what I am asking may seem obvious (although I have read all the similarly titled questions, and have searched extensively).  I need to monitor the accelerometer continuously for long periods.  Two approaches have been suggested:  </p>
  
  <p>1) acquire a partial wake lock that is held the entire time the acceleromtere is being monitored; and</p>
  
  <p>2) monitor the accelerometer in a foreground service.</p>
  
  <p>The first approach appears to use a lot of battery life.  The second approach should result in a service that is only killed rarely, but I'm not sure what "rarely" means.  Which approach should be used, and are there alternatives that I should consider?</p>