Android에서 패키지 공개 상태 필터링
컬렉션을 사용해 정리하기
내 환경설정을 기준으로 콘텐츠를 저장하고 분류하세요.
앱에서 Android 11(API 수준 30) 이상을 타겟팅하고 기기에 설치된 다른 앱에 관한 정보를 쿼리하는 경우 시스템은 기본적으로 이 정보를 필터링합니다. 이러한 필터링 동작은 앱이 기기에 설치된 모든 앱을 감지할 수는 없다는 의미입니다. 이는 앱이 액세스할 수는 있지만 사용 사례를 충족하는 데 필요하지 않은 잠재적으로 민감한 정보를 최소화하는 데 도움이 됩니다.
또한 필터링된 패키지 공개 상태는 Google Play 같은 앱 스토어에서 앱이 사용자에게 제공하는 개인 정보 보호 및 보안을 평가하는 데 도움이 됩니다. 예를 들어 Google Play에서는 설치된 앱 목록을 개인 정보 및 민감한 사용자 데이터로 간주합니다.
제한된 앱 공개 상태는 다른 앱에 관한 정보를 제공하는 메서드(queryIntentActivities()
, getPackageInfo()
, getInstalledApplications()
)의 반환 결과에 영향을 미칩니다.
제한된 공개 상태는 다른 앱과의 명시적 상호작용(예: 다른 앱의 서비스 시작)에도 영향을 줍니다.
일부 패키지는 자동으로 표시됩니다. 앱은 설치된 다른 앱에 관한 쿼리에서 항상 이러한 패키지를 감지할 수 있습니다. 다른 패키지를 보려면 <queries>
요소를 사용하여 패키지 공개 상태 확대를 위한 앱 요구사항을 선언하세요. 사용 사례 페이지에서는 패키지 공개 상태를 선택적으로 확장하는 방법의 예를 제공합니다. 여기에 설명된 워크플로를 사용하면 사용자 개인 정보를 보호하면서 일반적인 앱 상호작용 시나리오를 처리할 수 있습니다.
드물지만 <queries>
요소가 적절한 패키지 공개 상태를 제공하지 않는 경우 QUERY_ALL_PACKAGES
권한을 사용할 수 있습니다. Google Play에 앱을 게시하면 앱에서 이 권한을 사용할 때 승인을 받아야 합니다.
패키지 공개 상태 동작 테스트 페이지에서는 앱이 다른 앱과의 상호작용을 사용할 때 패키지 공개 상태에 따라 동작 변경사항을 테스트하는 방법에 관한 제안사항을 제공합니다.
추가 리소스
Android에서의 패키지 공개 상태를 자세히 알아보려면 다음 자료를 참고하세요.
블로그 게시물
이 페이지에 나와 있는 콘텐츠와 코드 샘플에는 콘텐츠 라이선스에서 설명하는 라이선스가 적용됩니다. 자바 및 OpenJDK는 Oracle 및 Oracle 계열사의 상표 또는 등록 상표입니다.
최종 업데이트: 2025-08-27(UTC)
[null,null,["최종 업데이트: 2025-08-27(UTC)"],[],[],null,["# Package visibility filtering on Android\n\nWhen an app targets Android 11 (API level 30) or higher and queries for\ninformation about the other apps that are installed on a device, the system\nfilters this information by default. This filtering behavior means that your app\ncan't detect all the apps installed on a device, which helps minimize the\npotentially sensitive information that your app can access but doesn't need\nto fulfill its use cases.\n\nAlso, filtered package visibility helps app\nstores like Google Play assess the privacy and security that your app provides\nfor users. For example, Google Play considers the list of installed apps to be\n[personal and sensitive user\ndata](https://support.google.com/googleplay/android-developer/answer/10144311#zippy=%2Cexamples-of-common-violations).\n\nLimited app visibility affects the results returned by methods that give\ninformation about other apps, such as\n[`queryIntentActivities()`](/reference/android/content/pm/PackageManager#queryIntentActivities(android.content.Intent,%20int)),\n[`getPackageInfo()`](/reference/android/content/pm/PackageManager#getPackageInfo(java.lang.String,%20int)),\nand\n[`getInstalledApplications()`](/reference/android/content/pm/PackageManager#getInstalledApplications(int)).\nThe limited visibility also affects explicit interactions with other apps, such\nas starting another app's service.\n\nSome packages are [visible\nautomatically](/training/package-visibility/automatic). Your app can always\ndetect these packages in its queries for other installed apps. To view other\npackages, [declare your app's need for increased package\nvisibility](/training/package-visibility/declaring) using the\n[`\u003cqueries\u003e`](/guide/topics/manifest/queries-element) element. The [use\ncases](/training/package-visibility/use-cases) page provides examples of how you\ncan selectively expand package visibility. The workflows described there allow\nyou to fulfill common app interaction scenarios while protecting user privacy.\n\nIn the rare cases where the `\u003cqueries\u003e` element doesn't provide adequate package\nvisibility, you can use the `QUERY_ALL_PACKAGES` permission. If you publish your\napp on Google Play, your app's use of this permission is\n[subject to approval](https://support.google.com/googleplay/android-developer/answer/10158779).\n\nThe page about\n[testing package visibility behavior](/training/package-visibility/testing)\noffers suggestions for how to test behavior changes based on package visibility\nwhen your app relies on interactions with other apps.\n\nAdditional resources\n--------------------\n\nTo learn more about package visibility on Android, view the following materials:\n\n### Blog posts\n\n- [Package visibility in\n Android 11](https://medium.com/androiddevelopers/package-visibility-in-android-11-cc857f221cd9), available on Medium."]]