- 문법:
<intent-filter android:icon="drawable resource" android:label="string resource" android:priority="integer" > ... </intent-filter>
- 포함된 위치:
<activity>
<activity-alias>
<service>
<receiver>
<provider>
- 포함해야 하는 요소
<action>
- 포함 가능한 요소
<category>
<data>
<uri-relative-filter-group>
- 설명:
- 활동, 서비스, broadcast receiver가 응답할 수 있는 인텐트의 유형을 지정합니다. 인텐트 필터는 상위 구성요소의 기능, 즉 활동이나 서비스가 할 수 있는 작업과 수신기가 처리할 수 있는 브로드캐스트의 유형을 선언합니다.
전달된 유형의 수신 인텐트로 구성요소를 열고 이 구성요소에 의미가 없는 인텐트를 필터링합니다. 필터 내용의 대부분은 하위 요소로 설명됩니다.
필터에 관한 자세한 내용은 인텐트 및 인텐트 필터 및 앱 매니페스트 개요의 인텐트 필터 섹션을 참고하세요.
- 속성:
android:icon
- 필터에 설명된 기능이 구성요소에 있다는 것을 사용자에게 설명할 때 상위 활동, 서비스, broadcast receiver를 나타내는 아이콘입니다.
이 속성은 이미지 정의가 포함된 드로어블 리소스의 참조로 설정됩니다. 기본값은 상위 구성요소의
icon
속성에 의해 설정된 아이콘입니다. 상위 요소가 아이콘을 지정하지 않으면 기본값은<application>
요소에서 설정된 아이콘이 됩니다.인텐트 필터 아이콘에 관한 자세한 내용은 앱 매니페스트 개요의 아이콘 및 라벨 섹션을 참고하세요.
android:label
- 사용자가 읽을 수 있는 상위 구성요소 라벨입니다. 필터에 설명된 기능이 구성요소에 있다는 것을 사용자에게 설명할 때는 상위 구성요소에서 설정한 라벨이 아니라 이 라벨이 사용됩니다.
라벨은 사용자 인터페이스의 다른 문자열처럼 현지화될 수 있도록 문자열 리소스의 참조로 설정합니다. 하지만 애플리케이션을 개발하는 동안 편의를 위해 라벨을 원시 문자열로 설정할 수도 있습니다.
기본값은 상위 구성요소에서 설정한 라벨입니다. 상위 요소가 라벨을 지정하지 않으면 기본값은
<application>
요소의label
속성에서 설정된 라벨입니다.인텐트 필터 라벨에 관한 자세한 내용은 앱 매니페스트 개요의 아이콘 및 라벨 섹션을 참고하세요.
android:priority
- 필터에 설명된 유형의 인텐트 처리와 관련하여 상위 구성요소에 부여된 우선순위입니다. 이 속성은 활동과 broadcast receiver에 모두 의미가 있습니다.
- 활동이 필터와 일치하는 인텐트에 응답하는 능력이 같은 인텐트에 응답할 수 있는 다른 활동과 비교할 때 어느 정도인지 알려줍니다. 우선순위가 서로 다른 여러 활동이 인텐트를 처리할 수 있는 경우 Android에서는 우선순위 값이 더 높은 활동만 인텐트의 잠재적 타겟으로 간주합니다.
브로드캐스트 메시지를 수신하기 위해 broadcast receiver를 실행하는 순서를 제어하며, 우선순위 값이 높은 수신기를 값이 낮은 수신기보다 먼저 호출합니다. 순서는 동기 메시지에만 적용됩니다. 비동기 메시지에서는 무시됩니다.
브로드캐스트를 특정 순서에 따라 수신해야 하거나 Android에서 특정 활동을 다른 활동보다 먼저 처리하도록 강제하려는 경우에만 이 속성을 사용하세요.
값은 정수입니다(예:
100
). 숫자가 높을수록 우선순위가 높습니다. 기본값은0
입니다.상황에 따라 요청된 우선순위가 무시되고 값이
0
으로 제한되기도 합니다. 다음과 같은 경우에 발생합니다.- 권한이 없는 애플리케이션이 0보다 큰 우선순위를 요청하는 경우
- 권한이 있는 애플리케이션이
ACTION_VIEW
,ACTION_SEND
,ACTION_SENDTO
,ACTION_SEND_MULTIPLE
을 위해 0보다 큰 우선순위를 요청하는 경우
자세한 내용은
setPriority()
를 참고하세요. android:order
여러 필터가 일치할 때 필터가 처리되는 순서입니다.
order
는priority
와는 다릅니다. 즉,priority
는 앱 전체적으로 적용되고order
는 단일 앱에서 일치하는 여러 필터 간의 차이를 구별합니다.여러 필터가 일치할 가능성이 있을 때는 대신 단일 수신자 인텐트를 사용하세요.
값은 정수입니다(예:
100
). 숫자가 높을수록 먼저 일치하게 됩니다. 기본값은0
입니다.이 속성은 API 수준 28에서 도입되었습니다.
android:autoVerify
- 지정된 호스트의 디지털 애셋 링크 JSON 파일과 이 애플리케이션의 일치 여부를 Android에서 확인해야 하는지를 나타냅니다.
자세한 내용은 Android App Links 인증하기를 참고하세요.
기본값은
false
입니다.이 속성은 API 수준 23에서 도입되었습니다.
- 도입 수준:
- API 수준 1
- 참고 항목:
<action>
<category>
<data>
<uri-relative-filter-group>
<intent-filter>
이 페이지에 나와 있는 콘텐츠와 코드 샘플에는 콘텐츠 라이선스에서 설명하는 라이선스가 적용됩니다. 자바 및 OpenJDK는 Oracle 및 Oracle 계열사의 상표 또는 등록 상표입니다.
최종 업데이트: 2025-07-27(UTC)
[null,null,["최종 업데이트: 2025-07-27(UTC)"],[],[],null,["# <intent-filter\u003e\n\nsyntax:\n:\n\n ```xml\n \u003cintent-filter android:icon=\"drawable resource\"\n android:label=\"string resource\"\n android:priority=\"integer\" \u003e\n ...\n \u003c/intent-filter\u003e\n ```\n\ncontained in:\n: [\u003cactivity\u003e](/guide/topics/manifest/activity-element)\n\n [\u003cactivity-alias\u003e](/guide/topics/manifest/activity-alias-element)\n\n [\u003cservice\u003e](/guide/topics/manifest/service-element)\n\n [\u003creceiver\u003e](/guide/topics/manifest/receiver-element)\n\n [\u003cprovider\u003e](/guide/topics/manifest/provider-element)\n\nmust contain:\n: [\u003caction\u003e](/guide/topics/manifest/action-element)\n\ncan contain:\n: [\u003ccategory\u003e](/guide/topics/manifest/category-element)\n\n [\u003cdata\u003e](/guide/topics/manifest/data-element)\n\n [\u003curi-relative-filter-group\u003e](/guide/topics/manifest/uri-relative-filter-group-element)\n\ndescription:\n\n: Specifies the types of intents that an activity, service, or broadcast receiver can respond to. An intent filter declares the capabilities of its parent component: what an activity or service can do and what types of broadcasts a receiver can handle.\u003cbr /\u003e\n\n It opens the component to receiving\n intents of the advertised type while filtering out those that aren't\n meaningful for the component.\n Most of the contents of the filter are described by its subelements:\n\n - [\u003caction\u003e](/guide/topics/manifest/action-element),\n - [\u003ccategory\u003e](/guide/topics/manifest/category-element),\n - [\u003cdata\u003e](/guide/topics/manifest/data-element), and\n - [\u003curi-relative-filter-group\u003e](/guide/topics/manifest/uri-relative-filter-group-element).\n\n \u003cbr /\u003e\n\n\n For a more detailed discussion of filters, see\n [Intents\n and Intent Filters](/guide/components/intents-filters) and the\n [Intent filters](/guide/topics/manifest/manifest-intro#ifs)\n section in the app manifest overview.\n\nattributes:\n:\n\n `android:icon`\n\n : An icon that represents the parent activity, service, or broadcast receiver when that component is presented to the user as having the capability described by the filter.\u003cbr /\u003e\n\n\n This attribute is set as a reference to a drawable resource\n containing the image definition. The default value is the icon set\n by the parent component's `icon` attribute. If the parent\n doesn't specify an icon, the default is the icon set by the\n [\u003capplication\u003e](/guide/topics/manifest/application-element) element.\n\n\n For more information about intent filter icons, see the\n [Icons and labels](/guide/topics/manifest/manifest-intro#iconlabel)\n section in the app manifest overview.\n\n `android:label`\n\n : A user-readable label for the parent component. This label, rather than the one set by the parent component, is used when the component is presented to the user as having the capability described by the filter.\u003cbr /\u003e\n\n\n The label is set as a reference to a string resource so that\n it can be localized like other strings in the user interface.\n However, as a convenience while you're developing the application,\n it can also be set as a raw string.\n\n\n The default value is the label set by the parent component. If the\n parent doesn't specify a label, the default is the label set by the\n [\u003capplication\u003e](/guide/topics/manifest/application-element) element's\n [label](/guide/topics/manifest/application-element#label) attribute.\n\n\n For more information about intent filter labels, see the\n [Icons and labels](/guide/topics/manifest/manifest-intro#iconlabel)\n section in the app manifest overview.\n\n `android:priority`\n : The priority given to the parent component with regard\n to handling intents of the type described by the filter. This attribute has\n meaning for both activities and broadcast receivers.\n\n - It provides information about how able an activity is to respond to an intent that matches the filter, relative to other activities that can also respond to the intent. When an intent can be handled by multiple activities with different priorities, Android considers only those with higher priority values as potential targets for the intent.\n - It controls the order in which broadcast receivers are executed to\n receive broadcast messages, with those having higher priority\n values being called before those having lower values. The order applies only\n to synchronous messages. It's ignored for asynchronous messages.\n\n\n Use this attribute only if you need to impose a specific order in\n which the broadcasts are received or want to force Android to prefer\n one activity over others.\n\n\n The value is an integer, such as `100`. Higher numbers have a\n higher priority. The default value is `0`.\n\n\n In certain circumstances the requested priority is ignored and the value\n is capped to `0`. This occurs when:\n\n - A non-privileged application requests any priority \\\u003e0.\n - A privileged application requests a priority \\\u003e0 for [ACTION_VIEW](/reference/android/content/Intent#ACTION_VIEW), [ACTION_SEND](/reference/android/content/Intent#ACTION_SEND), [ACTION_SENDTO](/reference/android/content/Intent#ACTION_SENDTO) or [ACTION_SEND_MULTIPLE](/reference/android/content/Intent#ACTION_SEND_MULTIPLE).\n\n\n For more information, see [setPriority()](/reference/android/content/IntentFilter#setPriority(int)).\n\n `android:order`\n\n : The order in which the filter is processed when multiple filters match.\n\n `order` differs from `priority` in that `priority` applies\n across apps, while `order` disambiguates multiple matching filters in a single\n app.\n\n When multiple filters can match, use a directed intent instead.\n\n The value is an integer, such as `100`. Higher numbers are matched first.\n The default value is `0`.\n\n This attribute was introduced in API level 28.\n\n `android:autoVerify`\n : Whether Android needs to verify that the Digital Asset Links JSON file from the specified\n host matches this application.\n\nintroduced in:\n: API level 1\n\nsee also:\n: [\u003caction\u003e](/guide/topics/manifest/action-element)\n\n [\u003ccategory\u003e](/guide/topics/manifest/category-element)\n\n [\u003cdata\u003e](/guide/topics/manifest/data-element)\n\n [\u003curi-relative-filter-group\u003e](/guide/topics/manifest/uri-relative-filter-group-element)"]]