<action>
컬렉션을 사용해 정리하기
내 환경설정을 기준으로 콘텐츠를 저장하고 분류하세요.
- 문법:
<action android:name="string" />
- 포함된 위치:
<intent-filter>
- 설명
- 인텐트 필터에 작업을 추가합니다.
<intent-filter>
요소에 <action>
요소가 하나 이상 포함되어야 합니다. 인텐트 필터에 <action>
요소가 없으면 필터가 Intent
객체를 허용하지 않습니다.
인텐트 필터와 필터 내의 작업 사양 역할에 관한 자세한 내용은 인텐트 및 인텐트 필터를 참고하세요.
- 속성:
android:name
- 작업의 이름입니다. 일부 표준 작업은
Intent
클래스에서 ACTION_string
상수로 정의됩니다. 이러한 작업 중 하나를 이 속성에 할당하려면 ACTION_
다음에 나오는 string
앞에 android.intent.action.
을 추가합니다.
예를 들어 ACTION_MAIN
이면 android.intent.action.MAIN
을 사용하고 ACTION_WEB_SEARCH
이면 android.intent.action.WEB_SEARCH
를 사용합니다.
개발자가 직접 정의하는 작업의 경우 고유성을 위해 앱의 패키지 이름을 접두사로 사용하는 것이 가장 좋습니다. 예를 들어 TRANSMOGRIFY
작업을 다음과 같이 지정할 수 있습니다.
<action android:name="com.example.project.TRANSMOGRIFY" />
- 도입 시기
- API 수준 1
- 참고 항목:
<intent-filter>
이 페이지에 나와 있는 콘텐츠와 코드 샘플에는 콘텐츠 라이선스에서 설명하는 라이선스가 적용됩니다. 자바 및 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,["# <action\u003e\n\nsyntax:\n:\n\n ```xml\n \u003caction android:name=\"string\" /\u003e\n ```\n\ncontained in:\n: [\u003cintent-filter\u003e](/guide/topics/manifest/intent-filter-element)\n\ndescription:\n: Adds an action to an intent filter.\n An [\u003cintent-filter\u003e](/guide/topics/manifest/intent-filter-element)\n element must contain one or more `\u003caction\u003e` elements. If there\n are no `\u003caction\u003e` elements in an intent filter, the filter\n doesn't accept any [Intent](/reference/android/content/Intent) objects.\n For details about intent filters and the role of action\n specifications within a filter, see\n [Intents and\n Intent Filters](/guide/components/intents-filters).\n\nattributes:\n:\n\n `android:name`\n : The name of the action. Some standard actions are defined in the\n [Intent](/reference/android/content/Intent#ACTION_CHOOSER) class as\n `ACTION_`*string* constants. To assign one of these actions to\n this attribute, prepend `android.intent.action.` to the\n *string* that follows `ACTION_`.\n For example, for `ACTION_MAIN`, use `android.intent.action.MAIN`,\n and for `ACTION_WEB_SEARCH`, use `android.intent.action.WEB_SEARCH`.\n\n\n For actions you define, it's best to use your app's package name as a prefix to\n help ensure uniqueness. For example, a `TRANSMOGRIFY` action might be specified\n as follows:\n\n\n ```xml\n \u003caction android:name=\"com.example.project.TRANSMOGRIFY\" /\u003e\n ```\n\nintroduced in:\n: API Level 1\n\nsee also:\n: [\u003cintent-filter\u003e](/guide/topics/manifest/intent-filter-element)"]]