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 the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.