<category>
Stay organized with collections
Save and categorize content based on your preferences.
- syntax:
<categoryandroid:name="string"/>
- contained in:
<intent-filter>
- description:
- Adds a category name to an intent filter. See Intents and Intent Filters for details on intent filters and the role of category specifications within a filter.
- attributes:
android:name
- The name of the category. Standard categories are defined in the
Intent
class asCATEGORY_name
constants. The name assigned here is derived from those constants by prefixingandroid.intent.category.
to thename
that followsCATEGORY_
. For example, the string value forCATEGORY_LAUNCHER
isandroid.intent.category.LAUNCHER
.Note: To receive implicit intents, you must include the
CATEGORY_DEFAULT
category in the intent filter. The methodsstartActivity()
andstartActivityForResult()
treat all intents as if they declared theCATEGORY_DEFAULT
category. If you don't declare it in your intent filter, no implicit intents can resolve your activity.For custom categories, use the package name as a prefix so that they are unique.
- introduced in:
- API Level 1
- see also:
<action>
<data>