Looking deeper into Android Intents

The most operations you plan to perform in Android are defined through the Intent class. Intents can be used to start activities like we did, start services (processes running in background), or send broadcast messages.

Intent usually accepts an action and data that we want to pass to some class. Action attributes we can set are, for example, ACTION_VIEW, ACTION_EDIT, ACTION_MAIN.

Except action and data, we can set a category for the intent. The category gives additional information to the action we set. We can also set the type for the intent and the component that stands for the explicit component class name we will use.

There are two types of intents:

  • Explicit intents
  • Implicit intents

Explicit intents ...

Get Mastering Android Development with Kotlin now with O’Reilly online learning.

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