This question brought up an interesting issue.
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 BroadcastReceiver, the markers can be displayed by an ItemizedOverlay on top of a MapView. The tricky part is to have the receiving part communicate with the main part of the app.
What happens if the app has an active
MapActivity, and then itsBroadcastReceiveris invoked as a response to an incoming SMS? Is theMapActivitysuspended while theBroadcastReceivercode is executed in the same process? If so, is it safe forBroadcastReceiverto access theMapActivityvia a static reference (which is set by the activity'sonCreatemethod?Conversely, is an app's
BroadcastReceiverexecuted in a separate process, and would therefore need some other way to communicate with the app's activty?