title: Communicate with Activity from Service (LocalService) - Android Best Practices
body: <p>Common scenario - Activity with a background Service to poll server.</p>
  
  <p>The Service will run periodically via AlarmManager and also perform tasks for the Activity (user hits a button, go fetch something from server).</p>
  
  <p>I'd like to know the best practices here.   I think the best design would be the Android LocalService example:
  <a href="http://developer.android.com/reference/android/app/Service.html#LocalServiceSample" rel="noreferrer">http://developer.android.com/reference/android/app/Service.html#LocalServiceSample</a></p>
  
  <p>However in the example the Activity has a reference to the activity <code>mBoundService</code> but there is no reverse connection (<strong>the Service has no way to call the Activity</strong>).</p>
  
  <p>What is the best way for the Service to call the Activity?</p>
  
  <p>Do I use Intents, BroadcastReceivers, Messages?  How?  </p>