OpenSource For You

The components of an intent

-

An intent itself is an object of the Intent class, which meets the descriptio­ns we talked about earlier. Broadly, the descriptio­ns Fan EH FlassifiHG as giYHn EHlRw: Describes what component should handle the intent. It is specified by the fully qualified class name of the component and the package name, with the project name, e.g., “com.example. project.lfy.SampleActi­vity” with “com. example.project”. Describes what action to be taken; e.g., ACTION_DIAL to specify ‘make a phone call’. Contains data required for the action; e.g., the phone number to call. Provides additional informatio­n about the action to perform; e.g., CATEGORY_LAUNCHER means it should appear in the Launcher as a top-level applicatio­n. Key-value pairs holding additional informatio­n, if any. Mostly used in the broadcast intents. For example, while reporting battery status, the intent describes battery ‘capacity’, ‘temperatur­e’, etc, as extras.

Newspapers in English

Newspapers from India