- सिंटैक्स:
<instrumentation android:functionalTest=["true" | "false"] android:handleProfiling=["true" | "false"] android:icon="drawable resource" android:label="string resource" android:name="string" android:targetPackage="string" android:targetProcesses="string" />
- इसमें शामिल है:
<manifest>
- विवरण:
- एक
Instrumentation
क्लास का एलान करता है, जो आपको सिस्टम के साथ ऐप्लिकेशन के इंटरैक्शन पर नज़र रखें.Instrumentation
ऑब्जेक्ट को किसी भी ऐप्लिकेशन के घटक से पहले इंस्टैंशिएट किया जाता है. - विशेषताएं:
android:functionalTest
- क्या
Instrumentation
क्लास, फ़ंक्शनल टेस्ट के तौर पर चलती है. अगर ऐसा होता है, तो यहtrue
है और अगर नहीं है, तोfalse
है. कॉन्टेंट बनाने डिफ़ॉल्ट वैल्यूfalse
है. android:handleProfiling
- क्या
Instrumentation
ऑब्जेक्ट, प्रोफ़ाइलिंग चालू करता है और बंद करें. अगर प्रोफ़ाइलिंग शुरू होती है, तो इसेtrue
माना जाता है और रुक जाता है औरfalse
अगर प्रोफ़ाइलिंग लंबे समय तक जारी रहती है दौड़ने.true
वैल्यू, ऑब्जेक्ट को प्रोफ़ाइलिंग को टारगेट करने में मदद करती है खास तरह की कार्रवाइयों के लिए तैयार किया गया है. डिफ़ॉल्ट वैल्यूfalse
है. android:icon
Instrumentation
क्लास दिखाने वाला आइकॉन. यह एट्रिब्यूट को ड्रॉ करने लायक संसाधन के रेफ़रंस के तौर पर सेट करना चाहिए.android:label
Instrumentation
क्लास के लिए ऐसा लेबल जिसे उपयोगकर्ता आसानी से पढ़ सके. लेबल को रॉ स्ट्रिंग या किसी स्ट्रिंग रिसॉर्स के रेफ़रंस के तौर पर सेट किया जा सकता है.android:name
Instrumentation
सब-क्लास का नाम. पूरी तरह क्वालिफ़ाइड क्लास के नाम का इस्तेमाल करें, जैसेcom.example.project.StringInstrumentation
. हालांकि, शॉर्टहैंड की मदद से, अगर नाम का पहला वर्ण एक पीरियड है, तो इसे पैकेज में जोड़ दिया जाता है<manifest>
एलिमेंट में बताया गया नाम.कोई डिफ़ॉल्ट सेटिंग नहीं है. नाम बताना ज़रूरी है.
android:targetPackage
Instrumentation
ऑब्जेक्ट चलाने वाला ऐप्लिकेशन टीम में हुए हैं. किसी ऐप्लिकेशन की पहचान इसमें असाइन किए गए पैकेज नाम से की जाती है मेनिफ़ेस्ट फ़ाइल को<manifest>
एलिमेंट से जोड़ना होगा.android:targetProcesses
वे प्रक्रियाएं जो
Instrumentation
ऑब्जेक्ट में होती हैं टीम से बचा जा सकता है. कॉमा लगाकर अलग की गई सूची से पता चलता है कि इंस्ट्रुमेंटेशन चल रहा है समस्या को हल करने में मदद मिलती है."*"
वैल्यू से पता चलता है कि इंस्ट्रुमेंटेशन, इसमें बताए गए ऐप्लिकेशन की सभी प्रोसेस पर चलता हैandroid:targetPackage
.अगर मेनिफ़ेस्ट में यह वैल्यू नहीं दी गई है, तो इंस्ट्रुमेंटेशन चलता है ऐप की मुख्य प्रक्रिया के अनुसार होता है
android:targetPackage
.यह एट्रिब्यूट, एपीआई लेवल 26 में जोड़ा गया था.
- इसमें पेश किया गया:
- एपीआई लेवल 1
<इंस्ट्रूमेंटेशन>
इस पेज पर मौजूद कॉन्टेंट और कोड सैंपल कॉन्टेंट के लाइसेंस में बताए गए लाइसेंस के हिसाब से हैं. 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,["# <instrumentation\u003e\n\nsyntax:\n:\n\n ```xml\n \u003cinstrumentation android:functionalTest=[\"true\" | \"false\"]\n android:handleProfiling=[\"true\" | \"false\"]\n android:icon=\"drawable resource\"\n android:label=\"string resource\"\n android:name=\"string\"\n android:targetPackage=\"string\"\n android:targetProcesses=\"string\" /\u003e\n ```\n\ncontained in:\n: [\u003cmanifest\u003e](/guide/topics/manifest/manifest-element)\n\ndescription:\n: Declares an [Instrumentation](/reference/android/app/Instrumentation) class that lets you\n monitor an application's interaction with the system. The `Instrumentation`\n object is instantiated before any of the application's components.\n\nattributes:\n:\n\n `android:functionalTest`\n : Whether the `Instrumentation` class runs as a functional test.\n This is `true` if it does and `false` if not. The\n default value is `false`.\n\n `android:handleProfiling`\n : Whether the `Instrumentation` object turns profiling on and\n off. This is `true` if it determines when profiling starts and\n stops and `false` if profiling continues the entire time it is\n running. A value of `true` enables the object to target profiling\n at a specific set of operations. The default value is `false`.\n\n `android:icon`\n : An icon that represents the `Instrumentation` class. This attribute\n must be set as a reference to a drawable resource.\n\n `android:label`\n : A user-readable label for the `Instrumentation` class. The label\n can be set as a raw string or a reference to a string resource.\n\n `android:name`\n : The name of the `Instrumentation` subclass.\n Use a fully qualified class name, such as\n `com.example.project.StringInstrumentation`. However, as a shorthand,\n if the first character of the name is a period, it is appended to the package\n name specified in the [\u003cmanifest\u003e](/guide/topics/manifest/manifest-element) element.\n\n\n There is no default. The name must be specified.\n\n `android:targetPackage`\n : The application that the `Instrumentation` object runs\n against. An application is identified by the package name assigned in its\n manifest file by the `\u003cmanifest\u003e` element.\n\n `android:targetProcesses`\n\n : The processes that the `Instrumentation` object\n runs against. A comma-separated list indicates that the instrumentation runs\n against those specific processes. A value of `\"*\"` indicates that the\n instrumentation runs against all processes of the app defined in\n `android:targetPackage`.\n\n If this value isn't provided in the manifest, the instrumentation runs\n only against the main process of the app defined in\n `android:targetPackage`.\n\n This attribute was added in API level 26.\n\nintroduced in:\n: API level 1"]]