title: Updating an Activity from a BroadcastReceiver
body: <p><a href="https://stackoverflow.com/questions/10216151/updating-google-maps-marker-from-a-broadcast-sms-receiver/10216546">This question</a> brought up an interesting issue.</p>
  
  <p>The OP has an app that displays a map, and this map needs to be updated with location markers that are received via SMS messages. The individual steps are fairly straightforward: the SMS messages can be received by a <code>BroadcastReceiver</code>, the markers can be displayed by an <code>ItemizedOverlay</code> on top of a <code>MapView</code>. The tricky part is to have the receiving part communicate with the main part of the app.</p>
  
  <ul>
  <li><p>What happens if the app has an active <code>MapActivity</code>, and then its <code>BroadcastReceiver</code> is invoked as a response to an incoming SMS? Is the <code>MapActivity</code> suspended while the <code>BroadcastReceiver</code> code is executed in the same process? If so, is it safe for <code>BroadcastReceiver</code> to access the <code>MapActivity</code> via a static reference (which is set by the activity's <code>onCreate</code> method?</p></li>
  <li><p>Conversely, is an app's <code>BroadcastReceiver</code> executed in a separate process, and would therefore need some other way to communicate with the app's activty? </p></li>
  </ul>