title: Need to get a service to talk back to the activity
body: <p>I need to create an activity that starts a service that monitors the users position and when within a certain zone allow the calling Activity to update its view informing the user.</p>
  
  <p>Since there are a few different ways to work with services I am a little confused to which of these is the correct one for my situation.</p>
  
  <p><strong>Use the <code>startService()</code> and <code>stopService()</code> methods</strong>:  From what I understand I can't directly talk back to the starting activity.  In the google docs there is an <a href="http://developer.android.com/guide/topics/fundamentals/services.html" rel="nofollow">example</a> showing how to pass a BroadcastReceiver to the service via a PendingIntent and call it, but  I don't think that allow for me to update the running activity's view...or will it?</p>
  
  <p><strong>Bound Service</strong>: From the docs it seems that this will allow for 2-way communication between the service and activity, but it was also mentioned that bound services don't run in the background <a href="http://developer.android.com/guide/topics/fundamentals/bound-services.html" rel="nofollow">indefinitely</a>.  Now I don't need, or even want, the service to run indefinitely, but in the worst case scenario I could need it to run in the bg for at least an hour or two without being killed.</p>
  
  <p><strong>Third (probably not so great) option</strong>: Run the location service in a thread in the activity, which will make real-time view updates easy, then in the onPause event, stop the location service in the activity and hand it off to a service via <code>startService()</code> and use the notification service to alert the user when a defined zone has been entered.</p>
  
  <p>Any advice would be greatly appreciated.</p>
  
  <ol>
  <li><p><a href="http://developer.android.com/guide/topics/fundamentals/services.html" rel="nofollow">this</a> says</p>
  
  <blockquote>
    <p>if you want the service to send a result back, then the client that starts the service can create a PendingIntent for a broadcast (with getBroadcast()) and deliver it to the service in the Intent that starts the service. The service can then use the broadcast to deliver a result.</p>
  </blockquote></li>
  <li><p>and <a href="http://developer.android.com/guide/topics/fundamentals/bound-services.html" rel="nofollow">this</a> says</p>
  
  <blockquote>
    <p>A bound service typically lives only while it serves another application component and does not run in the background indefinitely.</p>
  </blockquote></li>
  </ol>