title: Uninterrupted listening to incoming sms messages in background - Service?
body: <p>My application listens to incoming sms messages through SmsReceiver (which extends BroadcastReceiver).
  SmsReceiver is registered in onStartCommand method of Service (to enable long-running listening for sms messages). onStartCommand returns Service.START_STICKY (to restart Service in case it's killed due to low memory conditions - if I understand docs correctly ;)).</p>
  
  <p>Application uses several Activities (one of them starts Service by calling Context.startService).</p>
  
  <p>The problem:
  After all activities are gone, service continues to run <strong>for some time</strong> (at most several hours), and stops eventually.</p>
  
  <p>How to maximize service running time in such conditions? Alternatively, what tricks would allow such functionality (uninterrupted listening to incoming sms messages without visible Activities, "background" task running indefinitely).</p>