If your background is with ECMA languages (JavaScript, ActionScript), passing data around the Android environment can get a little confusing. Fortunately, there’s a class that makes things a little more familiar – LocalBroadcastReceiver. Strangely, this is only available in the support library, but that’s pretty much a requirement for most apps, and is in fact included by default when creating projects with any relatively recent version of Eclipse.

You can register an “event listener” anywhere you’d like:

The listener is the equivalent of the event handler…

And you can dispatch an event from anywhere else…

You can pass additional data with Intent.put/getExtras, just like you would when starting an Activity.