Intent (Android) Explained

An Intent in the Android operating system is a software mechanism that allows users to coordinate the functions of different activities to achieve a task. An Intent is a messaging object[1] which provides a facility for performing late runtime binding between the code in different applications in the Android development environment. Its most significant use is in the launching of activities, where it can be thought of as the glue between activities: Intents provide an inter-application messaging system that encourages collaboration and component reuse.[2]

An Intent is basically a passive data structure holding an abstract description of an action to be performed.[3] For Dummies likens an Intent to flicking a switch: "Your intent is to turn on the light, and to do so, you perform the action of flipping the switch to the On position."[4]

Description

The concept was created as a way to allow developers to easily remix different apps and allow each type of task (called activity) to be handled by the application best suited to it, even if provided by a third party. Although the concept was not new, the Android architecture doesn't require elevated privileges to access the components, which makes it an open platform.[5]

Activities in Android are defined as classes that control the life cycle of a task in the user interface. The activities supported by an application are declared in a manifest, so that other applications can read what activities are supported. Intents in one application can start particular activities in a different application, if the latter supports the message type of the Intent.[6]

An analysis in 2011 by researchers from The University of California at Berkeley found that Intents can pose a security risk, allowing attackers to read content in messages and to insert malicious messages between applications. [2]

Notes and References

  1. Book: Ferrill, Paul. Pro Android Python with SL4A. 2011. Apress. 3. 9781430235699.
  2. [Adrienne Porter Felt|Felt, A. P.]
  3. http://developer.android.com/reference/android/content/Intent.html Android API
  4. Web site: Felker. Donn. Common Android Intent Usage. For Dummies. Wiley. 3 September 2013. 21 August 2013. https://web.archive.org/web/20130821083845/http://www.dummies.com/how-to/content/common-android-intent-usage0.html. dead.
  5. Web site: Remixing apps with Android intents . . developer.vodafone.com . 18 September 2013 . dead . https://web.archive.org/web/20131004084946/http://developer.vodafone.com/develop-apps/android/android-intents/ . 4 October 2013 .
  6. Web site: Activities, Tasks and Intents, Oh My! . . 18 September 2013 . Cooper, Bruce. 12 July 2011 .