Creating and consuming intents

The Intent class is Android's primary method of "late binding". It's a form of very loose coupling which allows you to specify an action (along with some parameter data), while not specifying how the action should be carried out. For example, you may specify browse to http:// www.packtpub.com/ using an Intent, but you don't need to specify how Android should carry out this action. It may use the default "browser" application, or another web browser the user has installed, or it may even ask the user how exactly they want to get to http:// www.packtpub.com/. There are two primary types of Intent:

  • Explicit Intents
  • Implicit Intents

So far we've only made use of explicit Intent objects, where we specify the exact class ...

Get Android User Interface Development now with O’Reilly online learning.

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