6Intents and Broadcast Receivers


Intents are a message-passing mechanism you can use within your application, between applications, and between the system and your application. Intents are used to do the following:

  • Explicitly start a particular Service, Broadcast Receiver, Activity, or sub-Activity using its class name
  • Start an Activity, sub-Activity, or Service to perform an action with (or on) a particular piece of data
  • Return information from a sub-Activity
  • Broadcast that an event has occurred

Intents are a fundamental part of the Android OS, they’re also quite unique to Android, and as such can be a confusing concept to master.

Intents can be used to send information among any application components installed on an Android device, no matter which application they’re a part ...

Get Professional Android, 4th Edition now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.