संग्रह की मदद से व्यवस्थित रहें
अपनी प्राथमिकताओं के आधार पर, कॉन्टेंट को सेव करें और कैटगरी में बांटें.
अगर आपका ऐप्लिकेशन, इस्तेमाल के उदाहरणों को पूरा करने के लिए अन्य ऐप्लिकेशन के साथ इंटरैक्शन पर निर्भर करता है, तो यह जांच करना ज़रूरी है कि Android 11 (एपीआई लेवल 30) और उसके बाद के वर्शन में पैकेज विज़िबिलिटी में हुए बदलावों का आपके ऐप्लिकेशन पर क्या असर पड़ता है.
इस गाइड में, व्यवहार में हुए बदलावों को टेस्ट करने के बारे में कुछ सुझाव भी दिए गए हैं. साथ ही, यह आपको लॉग मैसेज कॉन्फ़िगर करने में मदद करती है, ताकि यह तय किया जा सके कि आपके ऐप्लिकेशन पर किस लेवल तक असर पड़ सकता है.
बदलावों के असर की जांच करना
यह जांच करने के लिए कि इस बदलाव का असर आपके ऐप्लिकेशन पर पड़ता है या नहीं, यह तरीका अपनाएं:
देखें कि आपके ऐप्लिकेशन की कौनसी सुविधाएं काम नहीं कर रही हैं.
उन सुविधाओं को ठीक करने के लिए, सही <queries>
एंट्री जोड़ें.
पैकेज फ़िल्टर करने के लिए, लॉग मैसेज कॉन्फ़िगर करना
ऐप्लिकेशन की डिफ़ॉल्ट विज़िबिलिटी से आपके ऐप्लिकेशन पर क्या असर पड़ता है, इस बारे में ज़्यादा जानने के लिए, पैकेज फ़िल्टर करने के लिए लॉग मैसेज चालू करें. अगर Android Studio में कोई टेस्ट ऐप्लिकेशन या डीबग किया जा सकने वाला ऐप्लिकेशन डेवलप किया जा रहा है, तो सिस्टम लॉग में यह सुविधा उपलब्ध होती है. इसके अलावा, इसे मैन्युअल तरीके से चालू करने के लिए, टर्मिनल विंडो में यह कमांड चलाएं:
adb shell pm log-visibility --enable PACKAGE_NAME
इसके बाद, जब भी PackageManager ऑब्जेक्ट की रिटर्न वैल्यू से पैकेज फ़िल्टर किए जाते हैं, तब आपको Logcat में इस तरह का मैसेज दिखता है:
इस पेज पर मौजूद कॉन्टेंट और कोड सैंपल कॉन्टेंट के लाइसेंस में बताए गए लाइसेंस के हिसाब से हैं. Java और OpenJDK, Oracle और/या इससे जुड़ी हुई कंपनियों के ट्रेडमार्क या रजिस्टर किए हुए ट्रेडमार्क हैं.
आखिरी बार 2025-08-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-08-27 (UTC) को अपडेट किया गया."],[],[],null,["If your app relies on interactions with other apps to complete its use cases,\nit's useful to test how [package visibility](/training/package-visibility)\nchanges in Android 11 (API level 30) and higher affect your app.\n\nThis guide also gives some suggestions on how to test the behavior changes\nand helps you configure log messages to determine at a more granular\nlevel how your app might be affected.\n\nTest the behavior changes\n\nTo test whether this behavior change affects your app, complete the\nfollowing steps:\n\n1. Install [Android Studio 3.6.1](/studio) or higher.\n2. Install the latest version of Gradle that Android Studio supports.\n3. Set your app's `targetSdkVersion` to `30` or higher.\n4. Don't include the `\u003cqueries\u003e` element in your app's manifest file.\n5. Call [`getInstalledApplications()`](/reference/android/content/pm/PackageManager#getInstalledApplications(int)) or [`getInstalledPackages()`](/reference/android/content/pm/PackageManager#getInstalledPackages(int)). Both methods return a filtered list when they are successful.\n6. See which features of your app aren't working.\n7. Introduce appropriate [`\u003cqueries\u003e`](/guide/topics/manifest/queries-element) entries to fix those features.\n\nConfigure log messages for package filtering\n\nTo discover more details about how the default visibility of apps affects your\napp, you can enable log messages for package filtering. If you're developing a\ntest app or debuggable app in Android Studio, the [system log provides this\ncapability](/studio/debug#systemLog) for you. Otherwise, you can run the\nfollowing command in a terminal window to enable it manually: \n\n```\nadb shell pm log-visibility --enable PACKAGE_NAME\n```\n\nThen, whenever packages are filtered out of a `PackageManager` object's return\nvalues, you see a message similar to the following in Logcat: \n\n```\nI/AppsFilter: interaction: PackageSetting{7654321 \\\n com.example.myapp/12345} -\u003e PackageSetting{...} BLOCKED\n```\n| **Caution:** Your app's performance is affected when this flag is enabled. Unless you're testing how package visibility affects your app, disable the logging of messages related to package visibility."]]