- Sintaxe:
<intent-filter android:icon="drawable resource" android:label="string resource" android:priority="integer" > ... </intent-filter>
- contido em:
<activity>
<activity-alias>
<service>
<receiver>
<provider>
- precisa conter:
<action>
- pode conter:
<category>
<data>
<uri-relative-filter-group>
- descrição:
- Especifica os tipos de intents aos quais uma atividade, um serviço ou um broadcast
receiver pode responder. Um filtro de intent declara as capabilities do
componente pai: o que uma atividade ou um serviço pode fazer e que tipos
de transmissões um receiver pode gerenciar.
Ele abre o componente para receber intents do tipo anunciado e, ao mesmo tempo, filtrar as que não são significativas para o componente. A maior parte do conteúdo do filtro é descrita pelos subelementos:
Para uma discussão mais detalhada sobre filtros, consulte Intents e filtros de intent e a seção Filtros de intent na visão geral do manifesto do app.
- atributos:
android:icon
- Um ícone que representa a atividade mãe, o serviço ou o broadcast
receiver quando esse componente é apresentado ao usuário
como tendo a capability descrita pelo filtro.
Esse atributo é definido como uma referência a um recurso drawable que contém a definição da imagem. O valor padrão é o ícone definido pelo atributo
icon
do componente pai. Se o pai não especificar um ícone, o padrão será o definido pelo elemento<application>
.Para mais informações sobre ícones de filtro de intent, consulte a seção Ícones e rótulos na visão geral do manifesto do app.
android:label
- Rótulo legível pelo usuário para o componente pai. Em vez do
definido pelo componente pai, esse rótulo é usado quando o componente é apresentado
ao usuário como tendo a capability descrita pelo filtro.
O rótulo é definido como referência a um recurso de string para que possa ser localizado como outras strings da interface do usuário. No entanto, para facilitar o desenvolvimento do app, ele também pode ser definido como uma string bruta.
O valor padrão é o rótulo definido pelo componente pai. Se o pai não especificar um rótulo, o padrão será o definido pelo atributo
label
do elemento<application>
.Para mais informações sobre os rótulos de filtros de intent, consulte a seção Ícones e rótulos na visão geral do manifesto do app.
android:priority
- A prioridade dada ao componente pai em relação
ao processamento de intents do tipo descrito pelo filtro. Esse atributo tem
significado para as atividades e os broadcast receivers.
- Ele fornece informações sobre como uma atividade pode responder a uma intent que corresponde ao filtro em relação a outras atividades que também podem responder à intent. Quando uma intent pode ser processada por várias atividades com prioridades diferentes, o Android considera apenas aquelas com valores de prioridade mais altos como possíveis destinos para a intent.
Ele controla a ordem em que os broadcast receivers são executados para receber mensagens de transmissão, com aqueles que têm valores de prioridade mais altos sendo chamados antes dos que têm valores mais baixos. A ordem se aplica apenas a mensagens síncronas. Ela é ignorada nas assíncronas.
Use esse atributo apenas se você realmente precisar impor uma ordem específica em que as transmissões são recebidas ou se quiser forçar o Android a preferir uma atividade em detrimento de outras.
O valor é um número inteiro, como
100
. Números maiores têm prioridade mais alta. O valor padrão é0
.Em determinadas circunstâncias, a prioridade solicitada é ignorada, e o valor é limitado a
0
. Isso ocorre quando:- um app sem privilégios solicita qualquer prioridade maior que 0;
- um app privilegiado solicita uma prioridade maior que 0 para
ACTION_VIEW
,ACTION_SEND
,ACTION_SENDTO
ouACTION_SEND_MULTIPLE
.
Para mais informações, consulte
setPriority()
. android:order
A ordem em que o filtro é processado quando vários filtros são correspondentes.
A
order
é diferente dapriority
, já que apriority
se aplica entre apps, enquanto aorder
faz a desambiguação de vários filtros correspondentes em um único app.Quando houver correspondência a vários filtros, use uma intent direcionada.
O valor é um número inteiro, como
100
. A correspondência dos números mais altos é feita primeira. O valor padrão é0
.Esse atributo foi aplicado no nível 28 da API.
android:autoVerify
- Caso o Android precise verificar se o arquivo JSON do Digital Asset Links do host especificado corresponde a esse app.
Para mais informações, consulte Verificar Links do app Android.
O valor padrão é
false
.Esse atributo foi aplicado no nível 23 da API.
- aplicado no:
- Nível 1 da API
- confira também:
<action>
<category>
<data>
<uri-relative-filter-group>
<intent-filter>
O conteúdo e os exemplos de código nesta página estão sujeitos às licenças descritas na Licença de conteúdo. Java e OpenJDK são marcas registradas da Oracle e/ou suas afiliadas.
Última atualização 2025-07-27 UTC.
[[["Fácil de entender","easyToUnderstand","thumb-up"],["Meu problema foi resolvido","solvedMyProblem","thumb-up"],["Outro","otherUp","thumb-up"]],[["Não contém as informações de que eu preciso","missingTheInformationINeed","thumb-down"],["Muito complicado / etapas demais","tooComplicatedTooManySteps","thumb-down"],["Desatualizado","outOfDate","thumb-down"],["Problema na tradução","translationIssue","thumb-down"],["Problema com as amostras / o código","samplesCodeIssue","thumb-down"],["Outro","otherDown","thumb-down"]],["Última atualização 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)"]]