- syntax:
<category android: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 can be derived from those constants by prefixing "android.intent.category.
" to thename
that followsCATEGORY_
. For example, the string value forCATEGORY_LAUNCHER
is "android.intent.category.LAUNCHER
".Note: In order 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 do not declare it in your intent filter, no implicit intents will resolve to your activity.Custom categories should use the package name as a prefix, to ensure that they are unique.
- introduced in:
- API Level 1
- see also:
<action>
<data>
Content and code samples on this page are subject to the licenses described in the Content License. Java and OpenJDK are trademarks or registered trademarks of Oracle and/or its affiliates.
Last updated 2019-12-27 UTC.
[{
"type": "thumb-down",
"id": "missingTheInformationINeed",
"label":"Missing the information I need"
},{
"type": "thumb-down",
"id": "tooComplicatedTooManySteps",
"label":"Too complicated / too many steps"
},{
"type": "thumb-down",
"id": "outOfDate",
"label":"Out of date"
},{
"type": "thumb-down",
"id": "samplesCodeIssue",
"label":"Samples / code issue"
},{
"type": "thumb-down",
"id": "otherDown",
"label":"Other"
}]
[{
"type": "thumb-up",
"id": "easyToUnderstand",
"label":"Easy to understand"
},{
"type": "thumb-up",
"id": "solvedMyProblem",
"label":"Solved my problem"
},{
"type": "thumb-up",
"id": "otherUp",
"label":"Other"
}]