<category android:name="string" />
- contained in:
- 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.
- The name of the category. Standard categories are defined in the
CATEGORY_nameconstants. The name assigned here is derived from those constants by prefixing
CATEGORY_. For example, the string value for
Note: To receive implicit intents, you must include the
CATEGORY_DEFAULTcategory in the intent filter. The methods
startActivityForResult()treat all intents as if they declared the
CATEGORY_DEFAULTcategory. 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:
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 2023-03-22 UTC.