Jump to content

Intent (Android): Difference between revisions

From Wikipedia, the free encyclopedia
Content deleted Content added
add refs
→‎Description: Caps in the sources
(7 intermediate revisions by the same user not shown)
Line 3: Line 3:
<!-- For administrator use only: {{Old AfD multi|page=Intent (Android)|date=2 September 2013|result='''keep'''}} -->
<!-- For administrator use only: {{Old AfD multi|page=Intent (Android)|date=2 September 2013|result='''keep'''}} -->
<!-- End of AfD message, feel free to edit beyond this point -->
<!-- End of AfD message, feel free to edit beyond this point -->
An '''Intent''' is a messaging object<ref>{{cite book|last=Ferrill|first=Paul|title=Pro Android Python with SL4A|year=2011|publisher=Apress|page=3|url=http://books.google.co.uk/books?id=uYEmWet7QtsC&lpg=PA120&dq=intent%20android&pg=PA3#v=onepage&q=intent%20android&f=false}}</ref> which provides a facility for performing [[Late binding|late runtime binding]] between the code in different applications in the [[Android (operating system)|Android]] [[Development environment (software development process)|development environment]]. Its most significant use is in the launching of activities, where it can be thought of as the glue between activities. It is basically a [[passive data structure]] holding an [[Abstract data type|abstract description]] of an action to be performed.<ref name="android">[http://developer.android.com/reference/android/content/Intent.html Android API] retrieved 23-Jul-2013</ref> ''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."<ref>{{cite web|last=Felker|first=Donn|title=Common Android Intent Usage|url=http://www.dummies.com/how-to/content/common-android-intent-usage0.html|work=For Dummies|publisher=Wiley|accessdate=3 September 2013}}</ref>
An '''Intent''' in the [[Android (operating system)|Android operating system]] is a [[software]] mechanism that allows [[End-user (computer science)|user]]s to coordinate the functions of different applications to achieve a task. An Intent is a messaging object<ref>{{cite book|last=Ferrill|first=Paul|title=Pro Android Python with SL4A|year=2011|publisher=Apress|page=3|url=http://books.google.co.uk/books?id=uYEmWet7QtsC&lpg=PA120&dq=intent%20android&pg=PA3#v=onepage&q=intent%20android&f=false}}</ref> which provides a facility for performing [[Late binding|late runtime binding]] between the code in different applications in the Android [[Development environment (software development process)|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]].<ref name=berkeley>Felt, A. P., Chin, E., Hanna, S., Song, D., & Wagner, D. (2011, October). Android permissions demystified. In Proceedings of the 18th ACM conference on Computer and communications security (pp. 627-638). ACM.</ref>
An Intent is basically a [[passive data structure]] holding an [[Abstract data type|abstract description]] of an action to be performed.<ref name="android">[http://developer.android.com/reference/android/content/Intent.html Android API] retrieved 23-Jul-2013</ref> ''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."<ref>{{cite web|last=Felker|first=Donn|title=Common Android Intent Usage|url=http://www.dummies.com/how-to/content/common-android-intent-usage0.html|work=For Dummies|publisher=Wiley|accessdate=3 September 2013}}</ref>

==Description==

The concept was created as a way to allow developers to easily remix different apps and allow each type of [[Task analysis|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 privilege]]s to access the components, which makes it an [[open platform]].<ref name="vodafone">{{cite web | url=http://developer.vodafone.com/develop-apps/android/android-intents/ | title=Remixing apps with Android intents | publisher=[[Vodafone]] | work=defeloper.vodafone.com | accessdate=18 September 2013}}</ref>

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 (computing)|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 later support the message type of the Intent. <ref name="sitepoint">{{cite web | url=http://www.sitepoint.com/activities-tasks-and-intents-oh-my/ | title=Activities, Tasks and Intents, Oh My! | publisher=[[SitePoint]] | accessdate=18 September 2013 | author=Cooper, Bruce}}</ref>

An analysis in 2011 by researches from [[Berkeley University]] found that Intents can suppose a [[security risk]], allowing attackers to read content in messages and to insert malicious messages between applications. <ref name=berkeley/>


==References==
==References==

Revision as of 14:21, 18 September 2013

An Intent in the Android operating system is a software mechanism that allows users to coordinate the functions of different applications 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 later support the message type of the Intent. [6]

An analysis in 2011 by researches from Berkeley University found that Intents can suppose a security risk, allowing attackers to read content in messages and to insert malicious messages between applications. [2]

References

  1. ^ Ferrill, Paul (2011). Pro Android Python with SL4A. Apress. p. 3.
  2. ^ a b Felt, A. P., Chin, E., Hanna, S., Song, D., & Wagner, D. (2011, October). Android permissions demystified. In Proceedings of the 18th ACM conference on Computer and communications security (pp. 627-638). ACM.
  3. ^ Android API retrieved 23-Jul-2013
  4. ^ Felker, Donn. "Common Android Intent Usage". For Dummies. Wiley. Retrieved 3 September 2013.
  5. ^ "Remixing apps with Android intents". defeloper.vodafone.com. Vodafone. Retrieved 18 September 2013.
  6. ^ Cooper, Bruce. "Activities, Tasks and Intents, Oh My!". SitePoint. Retrieved 18 September 2013.