- 문법:
<category android:name="string" />
- 포함된 위치:
<intent-filter>
- 설명
- 인텐트 필터에 카테고리 이름을 추가합니다. 인텐트 필터 및 필터 내에서 카테고리 사양의 역할에 관해 자세히 알아보려면 인텐트 및 인텐트 필터를 참고하세요.
- 속성
android:name
- 카테고리의 이름입니다. 표준 카테고리는
Intent
클래스에서CATEGORY_name
상수로 정의됩니다. 여기서 할당된 이름은CATEGORY_
다음에 나오는name
앞에android.intent.category.
를 붙이는 방법으로 이러한 상수에서 파생됩니다. 예를 들어CATEGORY_LAUNCHER
의 문자열 값은android.intent.category.LAUNCHER
입니다.참고: 암시적 인텐트를 수신하려면 인텐트 필터에
CATEGORY_DEFAULT
카테고리를 포함해야 합니다.startActivity()
와startActivityForResult()
메서드는 마치 모든 인텐트에서CATEGORY_DEFAULT
카테고리를 선언한 것처럼 인텐트를 취급합니다. 인텐트 필터에서 이 카테고리를 선언하지 않으면 암시적 인텐트는 활동을 확인할 수 없습니다.맞춤 카테고리의 경우 패키지 이름을 접두사로 사용하여 고유하게 만듭니다.
- 도입 수준:
- API 수준 1
- 참고 항목:
<action>
<data>
<category>
이 페이지에 나와 있는 콘텐츠와 코드 샘플에는 콘텐츠 라이선스에서 설명하는 라이선스가 적용됩니다. 자바 및 OpenJDK는 Oracle 및 Oracle 계열사의 상표 또는 등록 상표입니다.
최종 업데이트: 2025-07-27(UTC)
[[["이해하기 쉬움","easyToUnderstand","thumb-up"],["문제가 해결됨","solvedMyProblem","thumb-up"],["기타","otherUp","thumb-up"]],[["필요한 정보가 없음","missingTheInformationINeed","thumb-down"],["너무 복잡함/단계 수가 너무 많음","tooComplicatedTooManySteps","thumb-down"],["오래됨","outOfDate","thumb-down"],["번역 문제","translationIssue","thumb-down"],["샘플/코드 문제","samplesCodeIssue","thumb-down"],["기타","otherDown","thumb-down"]],["최종 업데이트: 2025-07-27(UTC)"],[],[],null,["# <category\u003e\n\nsyntax:\n:\n\n ```xml\n \u003ccategory android:name=\"string\" /\u003e\n ```\n\ncontained in:\n: [\u003cintent-filter\u003e](/guide/topics/manifest/intent-filter-element)\n\ndescription:\n: Adds a category name to an intent filter. See\n [Intents and\n Intent Filters](/guide/components/intents-filters) for details on intent filters and the role of category\n specifications within a filter.\n\nattributes:\n:\n\n `android:name`\n : The name of the category. Standard categories are defined in the\n [Intent](/reference/android/content/Intent) class as `CATEGORY_`*name*\n constants. The name assigned here is derived from those constants\n by prefixing `android.intent.category.` to the\n *name* that follows `CATEGORY_`. For example,\n the string value for `CATEGORY_LAUNCHER` is\n `android.intent.category.LAUNCHER`.\n\n **Note:** To receive implicit intents, you must include the\n [CATEGORY_DEFAULT](/reference/android/content/Intent#CATEGORY_DEFAULT) category in the intent filter. The methods\n [startActivity()](/reference/android/app/Activity#startActivity(android.content.Intent)) and\n [startActivityForResult()](/reference/android/app/Activity#startActivityForResult(android.content.Intent, int)) treat all intents\n as if they declared the [CATEGORY_DEFAULT](/reference/android/content/Intent#CATEGORY_DEFAULT) category.\n If you don't declare it in your intent filter, no implicit intents can resolve\n your activity.\n\n\n For custom categories, use the package name as a prefix so\n that they are unique.\n\nintroduced in:\n: API Level 1\n\nsee also:\n: [\u003caction\u003e](/guide/topics/manifest/action-element)\n\n [\u003cdata\u003e](/guide/topics/manifest/data-element)"]]