O'Reilly logo

Learning Android Intents by Wajahat Karim, Muhammad Usama bin Aftab

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Methods of data transfer between activities

In this section, we will get started with the various data transfer techniques that are used in an Android application. The techniques have their own pros and cons. There are a total of three methods to transfer data explicitly from one activity to another. We will see them shortly along with their examples. The three methods are as follows:

  • Data transfer using putExtras()
  • Data transfer using Parcelable (only applicable to custom data objects)
  • Data transfer using Serializable (only applicable to custom data objects)

Data transfer using putExtras()

In Android, the simplest way to transfer data from one activity to another is by sending it through extras. The intent extras support primitive data types to send ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required