- सिंटैक्स:
<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>
- जानकारी:
- इससे यह तय होता है कि गतिविधि, सेवा या ब्रॉडकास्ट रिसीवर, किस तरह के इंटेंट का जवाब दे सकता है. इंटेंट फ़िल्टर, अपने पैरंट कॉम्पोनेंट की क्षमताओं के बारे में बताता है: कोई ऐक्टिविटी या सेवा क्या कर सकती है और कोई रिसीवर किस तरह के ब्रॉडकास्ट मैनेज कर सकता है.
इससे, विज्ञापन में दिखाए गए टाइप के इंटेंट पाने के लिए कॉम्पोनेंट खुल जाता है. साथ ही, ऐसे इंटेंट को फ़िल्टर कर दिया जाता है जो कॉम्पोनेंट के लिए काम के नहीं हैं. फ़िल्टर के ज़्यादातर कॉन्टेंट के बारे में, उसके सब-एलिमेंट से बताया जाता है:
फ़िल्टर के बारे में ज़्यादा जानने के लिए, ऐप्लिकेशन मेनिफ़ेस्ट की खास जानकारी में इंटेंट और इंटेंट फ़िल्टर और इंटेंट फ़िल्टर सेक्शन देखें.
- एट्रिब्यूट:
android:icon
- ऐसा आइकॉन जो पैरंट गतिविधि, सेवा या ब्रॉडकास्ट रिसीवर को दिखाता है. ऐसा तब होता है, जब उपयोगकर्ता को उस कॉम्पोनेंट के बारे में बताया जाता है कि उसमें फ़िल्टर में बताई गई सुविधाएं मौजूद हैं.
यह एट्रिब्यूट, इमेज की परिभाषा वाले ड्रॉबल संसाधन के रेफ़रंस के तौर पर सेट किया जाता है. डिफ़ॉल्ट वैल्यू, पैरंट कॉम्पोनेंट के
icon
एट्रिब्यूट से सेट किया गया आइकॉन होता है. अगर पैरंट एलिमेंट में कोई आइकॉन नहीं दिया गया है, तो डिफ़ॉल्ट रूप से<application>
एलिमेंट से सेट किया गया आइकॉन दिखता है.इंटेंट फ़िल्टर आइकॉन के बारे में ज़्यादा जानने के लिए, ऐप्लिकेशन मेनिफ़ेस्ट की खास जानकारी में आइकॉन और लेबल सेक्शन देखें.
android:label
- पैरंट कॉम्पोनेंट के लिए, उपयोगकर्ता के पढ़ने लायक लेबल. पैरंट कॉम्पोनेंट से सेट किए गए लेबल के बजाय, इस लेबल का इस्तेमाल तब किया जाता है, जब कॉम्पोनेंट को उपयोगकर्ता को फ़िल्टर में बताई गई सुविधा के तौर पर दिखाया जाता है.
लेबल को स्ट्रिंग रिसॉर्स के रेफ़रंस के तौर पर सेट किया जाता है, ताकि इसे यूज़र इंटरफ़ेस में मौजूद अन्य स्ट्रिंग की तरह स्थानीय भाषा में अनुवाद किया जा सके. हालांकि, ऐप्लिकेशन डेवलप करने के दौरान, इसे रॉ स्ट्रिंग के तौर पर भी सेट किया जा सकता है.
डिफ़ॉल्ट वैल्यू, पैरंट कॉम्पोनेंट से सेट किया गया लेबल होता है. अगर पैरंट लेबल नहीं तय करता है, तो डिफ़ॉल्ट तौर पर वह लेबल सेट किया जाता है जो
<application>
एलिमेंट केlabel
एट्रिब्यूट से सेट होता है.इंटेंट फ़िल्टर लेबल के बारे में ज़्यादा जानने के लिए, ऐप्लिकेशन मेनिफ़ेस्ट की खास जानकारी में आइकॉन और लेबल सेक्शन देखें.
android:priority
- फ़िल्टर में बताए गए टाइप के इंटेंट को मैनेज करने के लिए, पैरंट कॉम्पोनेंट को दी गई प्राथमिकता. इस एट्रिब्यूट का मतलब, गतिविधियों और ब्रॉडकास्ट रिसीवर, दोनों के लिए होता है.
- इससे यह जानकारी मिलती है कि कोई गतिविधि, फ़िल्टर से मैच करने वाले इंटेंट का जवाब देने में, उसी तरह की अन्य गतिविधियों के मुकाबले कितनी बेहतर है जो इंटेंट का जवाब दे सकती हैं. जब किसी इंटेंट को अलग-अलग प्राथमिकताओं वाली कई गतिविधियों से मैनेज किया जा सकता है, तो Android सिर्फ़ उन गतिविधियों को इंटेंट के संभावित टारगेट के तौर पर इस्तेमाल करता है जिनकी प्राथमिकता की वैल्यू ज़्यादा होती है.
यह उस क्रम को कंट्रोल करता है जिसमें ब्रॉडकास्ट मैसेज पाने के लिए, ब्रॉडकास्ट रिसीवर को चलाया जाता है. इसमें, जिन रिसीवर की प्राथमिकता वैल्यू ज़्यादा होती है उन्हें कम वैल्यू वाले रिसीवर से पहले कॉल किया जाता है. यह क्रम सिर्फ़ सिंक किए गए मैसेज पर लागू होता है. असाइनमेंट के लिए, यह विकल्प अनदेखा कर दिया जाता है.
इस एट्रिब्यूट का इस्तेमाल सिर्फ़ तब करें, जब आपको ब्रॉडकास्ट पाने के लिए कोई खास क्रम तय करना हो या Android को किसी एक ऐक्टिविटी को दूसरों के मुकाबले प्राथमिकता देनी हो.
वैल्यू कोई पूर्णांक होनी चाहिए, जैसे कि
100
. ज़्यादा संख्याओं को ज़्यादा प्राथमिकता दी जाती है. डिफ़ॉल्ट वैल्यू0
है.कुछ मामलों में, अनुरोध की गई प्राथमिकता को अनदेखा कर दिया जाता है और वैल्यू को
0
तक सीमित कर दिया जाता है. ऐसा तब होता है, जब:- बिना खास सुविधाओं वाले ऐप्लिकेशन, 0 से ज़्यादा प्राथमिकता का अनुरोध करते हैं.
- खास सुविधाओं वाला ऐप्लिकेशन,
ACTION_VIEW
,ACTION_SEND
,ACTION_SENDTO
याACTION_SEND_MULTIPLE
के लिए प्राथमिकता >0 का अनुरोध करता है.
ज़्यादा जानकारी के लिए,
setPriority()
देखें. android:order
एक से ज़्यादा फ़िल्टर मैच होने पर, फ़िल्टर को प्रोसेस करने का क्रम.
order
,priority
से इस मामले में अलग है किpriority
सभी ऐप्लिकेशन पर लागू होता है, जबकिorder
एक ही ऐप्लिकेशन में मैच करने वाले कई फ़िल्टर के बीच अंतर करता है.जब एक से ज़्यादा फ़िल्टर मैच हो सकते हैं, तो इसके बजाय डायरेक्टेड इंटेंट का इस्तेमाल करें.
वैल्यू कोई पूर्णांक होनी चाहिए, जैसे कि
100
. ज़्यादा संख्याओं का मिलान पहले किया जाता है. डिफ़ॉल्ट वैल्यू0
है.इस एट्रिब्यूट को एपीआई लेवल 28 में जोड़ा गया था.
android:autoVerify
- क्या Android को यह पुष्टि करनी होगी कि बताए गए होस्ट की डिजिटल ऐसेट लिंक JSON फ़ाइल, इस ऐप्लिकेशन से मेल खाती है या नहीं.
ज़्यादा जानकारी के लिए, Android ऐप्लिकेशन के लिंक की पुष्टि करना लेख पढ़ें.
डिफ़ॉल्ट वैल्यू
false
है.इस एट्रिब्यूट को एपीआई लेवल 23 में जोड़ा गया था.
- पहली बार इसमें दिखाया गया:
- एपीआई लेवल 1
- यह भी देखें:
<action>
<category>
<data>
<uri-relative-filter-group>
<इंटेंट-फ़िल्टर>
इस पेज पर मौजूद कॉन्टेंट और कोड सैंपल कॉन्टेंट के लाइसेंस में बताए गए लाइसेंस के हिसाब से हैं. Java और OpenJDK, 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,["# <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)"]]