동작 변경사항: Android 16 이상을 타겟팅하는 앱

이전 버전과 마찬가지로 Android 16에는 앱에 영향을 미칠 수 있는 동작 변경사항이 포함되어 있습니다. 다음 동작 변경사항은 Android 16 이상을 타겟팅하는 앱에만 적용됩니다. 앱이 Android 16 이상을 타겟팅하는 경우 이러한 동작을 올바르게 지원하도록 앱을 수정해야 합니다(해당하는 경우).

앱의 targetSdkVersion과 관계없이 Android 16에서 실행되는 모든 앱에 영향을 미치는 동작 변경사항 목록도 검토해야 합니다.

사용자 환경 및 시스템 UI

Android 16 (API 수준 36)에는 더 일관되고 직관적인 사용자 환경을 제공하기 위한 다음과 같은 변경사항이 포함되어 있습니다.

더 넓은 화면 선택 해제 기능이 지원 중단됨

Android 15 (API 수준 35)를 타겟팅하는 앱에는 Android 15에서 전체 화면이 적용되었지만 앱은 R.attr#windowOptOutEdgeToEdgeEnforcementtrue로 설정하여 선택 해제할 수 있습니다. Android 16 (API 수준 36)을 타겟팅하는 앱의 경우 R.attr#windowOptOutEdgeToEdgeEnforcement가 지원 중단되고 사용 중지되며 앱에서 전체 화면을 선택 해제할 수 없습니다.

  • 앱이 Android 16 (API 수준 36)을 타겟팅하고 Android 15 기기에서 실행되는 경우 R.attr#windowOptOutEdgeToEdgeEnforcement는 계속 작동합니다.
  • 앱이 Android 16 (API 수준 36)을 타겟팅하고 Android 16 기기에서 실행되는 경우 R.attr#windowOptOutEdgeToEdgeEnforcement가 사용 중지됩니다.

Android 16 베타 3에서 테스트하려면 앱이 더 넓은 화면을 지원하는지 확인하고 R.attr#windowOptOutEdgeToEdgeEnforcement를 사용하지 않도록 하여 앱이 Android 15 기기에서도 더 넓은 화면을 지원하도록 하세요. 전체 화면을 지원하려면 Compose 안내를 참고하세요.

뒤로 탐색 예측을 사용하려면 이전하거나 선택 해제해야 함

Android 16 (API 수준 36) 이상을 타겟팅하고 Android 16 이상 기기에서 실행되는 앱의 경우 뒤로 탐색 예측 시스템 애니메이션(홈으로 돌아가기, 교차 작업, 교차 활동)이 기본적으로 사용 설정됩니다. 또한 onBackPressed이 호출되지 않으며 KeyEvent.KEYCODE_BACK가 더 이상 전달되지 않습니다.

앱이 뒤로 이벤트를 가로채고 아직 뒤로 탐색 예측으로 이전하지 않은 경우 지원되는 뒤로 탐색 API를 사용하도록 앱을 업데이트하거나 앱의 AndroidManifest.xml 파일의 <application> 또는 <activity> 태그에서 android:enableOnBackInvokedCallback 속성을 false로 설정하여 일시적으로 선택 해제합니다.

홈으로 돌아가기 예측 애니메이션
예측 교차 활동 애니메이션
예측 교차 작업 애니메이션

Elegant Font API 지원 중단 및 사용 중지

Android 15 (API 수준 35)를 타겟팅하는 앱의 경우 기본적으로 elegantTextHeight TextView 속성이 true로 설정되어 있어 좁은 글꼴을 훨씬 더 읽기 쉬운 글꼴로 대체합니다. elegantTextHeight 속성을 false로 설정하여 이를 재정의할 수 있습니다.

Android 16에서는 elegantTextHeight 속성이 지원 중단되며 앱이 Android 16을 타겟팅하면 이 속성이 무시됩니다. 이러한 API로 제어되는 'UI 글꼴'이 지원 중단되므로 아랍어, 라오어, 미얀마어, 타밀어, 구자라트어, 칸나다어, 말라얄람어, 오디어, 텔루구어 또는 태국에서 일관되고 미래지향적인 텍스트 렌더링을 보장하도록 레이아웃을 조정해야 합니다.

Android 14 (API 수준 34) 이하를 타겟팅하는 앱 또는 elegantTextHeight 속성을 false로 설정하여 기본값을 재정의한 Android 15 (API 수준 35)를 타겟팅하는 앱의 elegantTextHeight 동작입니다.
Android 16을 타겟팅하는 앱 또는 elegantTextHeight 속성을 false로 설정하여 기본값을 재정의하지 않은 Android 15 (API 수준 35)를 타겟팅하는 앱의 elegantTextHeight 동작

핵심 기능

Android 16 (API 수준 36)에는 Android 시스템의 다양한 핵심 기능을 수정하거나 확장하는 다음과 같은 변경사항이 포함되어 있습니다.

고정 비율 작업 예약 최적화

Android 16을 타겟팅하기 전에는 scheduleAtFixedRate가 유효한 프로세스 수명 주기를 벗어나기 때문에 작업 실행을 놓쳤을 때 앱이 유효한 수명 주기로 돌아가면 누락된 실행이 모두 즉시 실행되었습니다.

Android 16을 타겟팅하는 경우 앱이 유효한 수명 주기로 돌아가면 누락된 scheduleAtFixedRate 실행이 최대 1회 즉시 실행됩니다. 이 동작 변경으로 앱 성능이 개선될 것으로 예상됩니다. 앱에서 이 동작을 테스트하여 앱이 영향을 받는지 확인합니다. 앱 호환성 프레임워크를 사용하고 STPE_SKIP_MULTIPLE_MISSED_PERIODIC_TASKS 호환성 플래그를 사용 설정하여 테스트할 수도 있습니다.

기기 폼 팩터

Android 16 (API 수준 36)에는 대형 화면 기기에 표시될 때 앱에 적용되는 다음과 같은 변경사항이 포함되어 있습니다.

적응형 레이아웃

With Android apps now running on a variety of devices (such as phones, tablets, foldables, desktops, cars, and TVs) and windowing modes on large screens (such as split screen and desktop windowing), developers should build Android apps that adapt to any screen and window size, regardless of device orientation. Paradigms like restricting orientation and resizability are too restrictive in today's multidevice world.

Ignore orientation, resizability, and aspect ratio restrictions

For apps targeting Android 16 (API level 36), Android 16 includes changes to how the system manages orientation, resizability, and aspect ratio restrictions. On displays with smallest width >= 600dp, the restrictions no longer apply. Apps also fill the entire display window, regardless of aspect ratio or a user's preferred orientation, and pillarboxing isn't used.

This change introduces a new standard platform behavior. Android is moving toward a model where apps are expected to adapt to various orientations, display sizes, and aspect ratios. Restrictions like fixed orientation or limited resizability hinder app adaptability, so we recommend making your app adaptive to deliver the best possible user experience.

You can also test this behavior by using the app compatibility framework and enabling the UNIVERSAL_RESIZABLE_BY_DEFAULT compat flag.

Common breaking changes

Ignoring orientation, resizability, and aspect ratio restrictions might impact your app's UI on some devices, especially elements that were designed for small layouts locked in portrait orientation: for example, issues like stretched layouts and off-screen animations and components. Any assumptions about aspect ratio or orientation can cause visual issues with your app. Learn more about how to avoid them and improve your app's adaptive behaviour.

Allowing device rotation results in more activity re-creation, which can result in losing user state if not properly preserved. Learn how to correctly save UI state in Save UI states.

Implementation details

The following manifest attributes and runtime APIs are ignored across large screen devices in full-screen and multi-window modes:

The following values for screenOrientation, setRequestedOrientation(), and getRequestedOrientation() are ignored:

  • portrait
  • reversePortrait
  • sensorPortrait
  • userPortrait
  • landscape
  • reverseLandscape
  • sensorLandscape
  • userLandscape

Regarding display resizability, android:resizeableActivity="false", android:minAspectRatio, and android:maxAspectRatio have no effect.

For apps targeting Android 16 (API level 36), app orientation, resizability, and aspect ratio constraints are ignored on large screens by default, but every app that isn't fully ready can temporarily override this behavior by opting out (which results in the previous behavior of being placed in compatibility mode).

Exceptions

The Android 16 orientation, resizability, and aspect ratio restrictions don't apply in the following situations:

  • Games (based on the android:appCategory flag)
  • Users explicitly opting in to the app's default behavior in aspect ratio settings of the device
  • Screens that are smaller than sw600dp

Opt out temporarily

To opt out a specific activity, declare the PROPERTY_COMPAT_ALLOW_RESTRICTED_RESIZABILITY manifest property:

<activity ...>
  <property android:name="android.window.PROPERTY_COMPAT_ALLOW_RESTRICTED_RESIZABILITY" android:value="true" />
  ...
</activity>

If too many parts of your app aren't ready for Android 16, you can opt out completely by applying the same property at the application level:

<application ...>
  <property android:name="android.window.PROPERTY_COMPAT_ALLOW_RESTRICTED_RESIZABILITY" android:value="true" />
</application>

건강 및 피트니스

Android 16 (API 수준 36)에는 건강/피트니스 데이터와 관련된 다음과 같은 변경사항이 포함되어 있습니다.

건강/피트니스 권한

For apps targeting Android 16 (API level 36) or higher, BODY_SENSORS permissions are transitioning to the granular permissions under android.permissions.health also used by Health Connect. Any API previously requiring BODY_SENSORS or BODY_SENSORS_BACKGROUND now requires the corresponding android.permissions.health permission. This affects the following data types, APIs, and foreground service types:

If your app uses these APIs, it should now request the respective granular permissions:

These permissions are the same as those that guard access to reading data from Health Connect, the Android datastore for health, fitness, and wellness data.

Mobile apps

Mobile apps migrating to use the READ_HEART_RATE and other granular permissions must also declare an activity to display the app's privacy policy. This is the same requirement as Health Connect.

연결

Android 16 (API 수준 36)에는 주변기기와의 연결성을 개선하기 위해 블루투스 스택에 다음과 같은 변경사항이 포함되어 있습니다.

결합 손실 및 암호화 변경사항을 처리하는 새로운 인텐트

연결 손실 처리 개선의 일환으로 Android 16에서는 앱에 연결 손실 및 암호화 변경에 대한 더 나은 인식을 제공하는 두 가지 새로운 인텐트를 도입합니다.

이제 Android 16을 타겟팅하는 앱은 다음을 실행할 수 있습니다.

  • 원격 결합 손실이 감지되면 ACTION_KEY_MISSING 인텐트를 수신하여 더 많은 정보를 제공하는 사용자 의견을 제공하고 적절한 조치를 취할 수 있습니다.
  • 링크의 암호화 상태가 변경될 때마다 ACTION_ENCRYPTION_CHANGE 인텐트를 수신합니다. 여기에는 암호화 상태 변경, 암호화 알고리즘 변경, 암호화 키 크기 변경이 포함됩니다. 나중에 ACTION_ENCRYPTION_CHANGE 인텐트를 수신할 때 연결이 성공적으로 암호화되면 앱은 결합이 복원되었다고 간주해야 합니다.

앱에서 현재 결합 손실 처리에 맞춤 메커니즘을 사용하는 경우 새 인텐트 ACTION_KEY_MISSING로 이전하여 결합 손실 이벤트를 감지하고 관리합니다. 앱은 기기 잊어버리기 및 재페어링을 시작하기 전에 사용자에게 원격 기기가 범위 내에 있는지 확인하도록 안내하는 것이 좋습니다.

또한 ACTION_KEY_MISSING 인텐트가 수신된 후 기기가 연결 해제되면 기기가 더 이상 시스템과 결합되지 않을 수 있으므로 앱은 기기에 다시 연결할 때 주의해야 합니다.

보안

Android 16 (API 수준 36)에는 다음과 같은 보안 변경사항이 포함되어 있습니다.

MediaStore 버전 잠금

For apps targeting Android 16 or higher, MediaStore#getVersion() will now be unique to each app. This eliminates identifying properties from the version string to prevent abuse and usage for fingerprinting techniques. Apps shouldn't make any assumptions around the format of this version. Apps should already handle version changes when using this API and in most cases shouldn't need to change their current behavior, unless the developer has attempted to infer additional information that is beyond the intended scope of this API.

더 안전한 인텐트

The Safer Intents feature is a multi-phase security initiative designed to improve the security of Android's intent resolution mechanism. The goal is to protect apps from malicious actions by adding checks during intent processing and filtering intents that don't meet specific criteria.

In Android 15 the feature focused on the sending app, now with Android 16, shifts control to the receiving app, allowing developers to opt-in to strict intent resolution using their app manifest.

Two key changes are being implemented:

  1. Explicit Intents Must Match the Target Component's Intent Filter: If an intent explicitly targets a component, it should match that component's intent filter.

  2. Intents Without an Action Cannot Match any Intent Filter: Intents that don't have an action specified shouldn't be resolved to any intent filter.

These changes only apply when multiple apps are involved and don't affect intent handling within a single app.

Impact

The opt-in nature means that developers must explicitly enable it in their app manifest for it to take effect. As a result, the feature's impact will be limited to apps whose developers:

  • Are aware of the Safer Intents feature and its benefits.
  • Actively choose to incorporate stricter intent handling practices into their apps.

This opt-in approach minimizes the risk of breaking existing apps that may rely on the current less-secure intent resolution behavior.

While the initial impact in Android 16 may be limited, the Safer Intents initiative has a roadmap for broader impact in future Android releases. The plan is to eventually make strict intent resolution the default behavior.

The Safer Intents feature has the potential to significantly enhance the security of the Android ecosystem by making it more difficult for malicious apps to exploit vulnerabilities in the intent resolution mechanism.

However, the transition to opt-out and mandatory enforcement must be carefully managed to address potential compatibility issues with existing apps.

Implementation

Developers need to explicitly enable stricter intent matching using the intentMatchingFlags attribute in their app manifest. Here is an example where the feature is opt-in for the entire app, but disabled/opt-out on a receiver:

<application android:intentMatchingFlags="enforceIntentFilter">
    <receiver android:name=".MyBroadcastReceiver" android:exported="true" android:intentMatchingFlags="none">
        <intent-filter>
            <action android:name="com.example.MY_CUSTOM_ACTION" />
        </intent-filter>
        <intent-filter>
            <action android:name="com.example.MY_ANOTHER_CUSTOM_ACTION" />
        </intent-filter>
    </receiver>
</application>

More on the supported flags:

Flag Name Description
enforceIntentFilter Enforces stricter matching for incoming intents
none Disables all special matching rules for incoming intents. When specifying multiple flags, conflicting values are resolved by giving precedence to the "none" flag
allowNullAction Relaxes the matching rules to allow intents without an action to match. This flag to be used in conjunction with "enforceIntentFilter" to achieve a specific behavior

Testing and Debugging

When the enforcement is active, apps should function correctly if the intent caller has properly populated the intent. However, blocked intents will trigger warning log messages like "Intent does not match component's intent filter:" and "Access blocked:" with the tag "PackageManager." This indicates a potential issue that could impact the app and requires attention.

Logcat filter:

tag=:PackageManager & (message:"Intent does not match component's intent filter:" | message: "Access blocked:")

개인정보 보호

Android 16 (API 수준 36)에는 다음과 같은 개인 정보 보호 변경사항이 포함되어 있습니다.

로컬 네트워크 권한

INTERNET 권한이 있는 모든 앱은 LAN의 기기에 액세스할 수 있습니다. 이렇게 하면 앱이 로컬 기기에 쉽게 연결할 수 있지만 사용자의 지문 생성, 위치의 프록시 역할 등 개인 정보 보호와 관련된 문제도 있습니다.

로컬 네트워크 보호 프로젝트는 새로운 런타임 권한 뒤에 로컬 네트워크에 대한 액세스를 제한하여 사용자의 개인 정보를 보호하는 것을 목표로 합니다.

출시 계획

이 변경사항은 25Q2 및 미정 두 버전 사이에 배포됩니다. 이러한 보호 조치는 나중에 출시되는 Android 버전에서 시행되므로 개발자는 25Q2에 관한 이 안내를 따르고 의견을 공유해야 합니다. 또한 다음 안내를 사용하여 암시적 로컬 네트워크 액세스에 종속된 시나리오를 업데이트하고 사용자 거부 및 새 권한 취소에 대비해야 합니다.

영향

현재 LNP는 선택사항 기능이므로 선택한 앱에만 영향을 미칩니다. 선택 단계의 목표는 앱 개발자가 다음 출시에서 권한 보호를 준비할 수 있도록 앱의 어떤 부분이 암시적 로컬 네트워크 액세스에 종속되는지 파악하는 것입니다.

다음을 사용하여 사용자의 로컬 네트워크에 액세스하는 앱은 영향을 받습니다.

  • 로컬 네트워크 주소에서 원시 소켓의 직접 또는 라이브러리 사용 (예: mDNS 또는 SSDP 서비스 검색 프로토콜)
  • 로컬 네트워크에 액세스하는 프레임워크 수준 클래스 (예: NsdManager) 사용

로컬 네트워크 주소 또는 에서 전송되는 트래픽에는 로컬 네트워크 액세스 권한이 필요합니다. 다음 표에는 몇 가지 일반적인 케이스가 나와 있습니다.

앱 하위 수준 네트워크 작업 로컬 네트워크 권한 필요
아웃바운드 TCP 연결 만들기
수신 TCP 연결 수락
UDP 유니캐스트, 멀티캐스트, 브로드캐스트 전송
수신 UDP 유니캐스트, 멀티캐스트, 브로드캐스트

이러한 제한사항은 네트워킹 스택 깊숙한 곳에 구현되므로 모든 네트워킹 API에 적용됩니다. 여기에는 네이티브 또는 관리 코드에서 생성된 소켓, Cronet 및 OkHttp와 같은 네트워킹 라이브러리, 그 위에 구현된 모든 API가 포함됩니다. 로컬 네트워크에서 서비스를 확인하려고 하면 (예: .local 접미사가 있는 서비스) 로컬 네트워크 권한이 필요합니다.

위 규칙의 예외:

  • 기기의 DNS 서버가 로컬 네트워크에 있는 경우 포트 53에서 DNS 서버와의 트래픽에는 로컬 네트워크 액세스 권한이 필요하지 않습니다.
  • 출력 전환 도구를 인앱 선택 도구로 사용하는 애플리케이션에는 로컬 네트워크 권한이 필요하지 않습니다 (2025년 4분기에 자세한 안내가 제공될 예정).

개발자 가이드 (선택사항)

로컬 네트워크 제한을 선택하려면 다음 단계를 따르세요.

  1. 25Q2 베타 3 이상이 포함된 빌드로 기기를 플래시합니다.
  2. 테스트할 앱을 설치합니다.
  3. adb에서 Appcompat 플래그를 전환합니다.

    adb shell am compat enable RESTRICT_LOCAL_NETWORK <package_name>
    
  4. 기기 재부팅

이제 앱의 로컬 네트워크 액세스가 제한되며 로컬 네트워크에 액세스하려고 하면 소켓 오류가 발생합니다. 앱 프로세스 외부에서 로컬 네트워크 작업을 실행하는 API (예: NsdManager)를 사용하는 경우 선택 단계에서 영향을 받지 않습니다.

액세스 권한을 복원하려면 앱에 NEARBY_WIFI_DEVICES 권한을 부여해야 합니다.

  1. 앱이 매니페스트에서 NEARBY_WIFI_DEVICES 권한을 선언하는지 확인합니다.
  2. 설정 > 앱 > [애플리케이션 이름] > 권한 > 근처 기기 > 허용으로 이동합니다.

이제 앱의 로컬 네트워크 액세스가 복원되고 모든 시나리오가 앱을 선택하기 전과 동일하게 작동합니다.

로컬 네트워크 보호 시행이 시작되면 앱 네트워크 트래픽에 미치는 영향은 다음과 같습니다.

권한 아웃바운드 LAN 요청 아웃바운드/인바운드 인터넷 요청 인바운드 LAN 요청
승인됨 작동의 원리 작동의 원리 작동의 원리
허용되지 않음 실패 경험 작동의 원리 실패 경험

다음 명령어를 사용하여 App-Compat 플래그를 사용 중지합니다.

adb shell am compat disable RESTRICT_LOCAL_NETWORK <package_name>

오류

이러한 제한으로 인해 발생하는 오류는 send 또는 로컬 네트워크 주소로의 send 변형을 호출할 때마다 호출 소켓에 반환됩니다.

오류 예시:

sendto failed: EPERM (Operation not permitted)

sendto failed: ECONNABORTED (Operation not permitted)

로컬 네트워크 정의

이 프로젝트에서 로컬 네트워크는 Wi-Fi 또는 이더넷과 같이 브로드캐스트 가능한 네트워크 인터페이스를 활용하는 IP 네트워크를 의미하지만, 모바일 (WWAN) 또는 VPN 연결은 제외합니다.

다음은 로컬 네트워크로 간주됩니다.

IPv4:

  • 169.254.0.0/16 // 링크 로컬
  • 100.64.0.0/10 // CGNAT
  • 10.0.0.0/8 // RFC1918
  • 172.16.0.0/12 // RFC1918
  • 192.168.0.0/16 // RFC1918

IPv6:

  • 링크-로컬
  • 직접 연결된 경로
  • 스레드와 같은 스텁 네트워크
  • 다중 서브넷 (TBD)

또한 멀티캐스트 주소 (224.0.0.0/4, ff00::/8)와 IPv4 브로드캐스트 주소 (255.255.255.255)는 모두 로컬 네트워크 주소로 분류됩니다.

앱 소유 사진

Android 16 이상을 실행하는 기기에서 SDK 36 이상을 타겟팅하는 앱에서 사진 및 동영상 권한을 요청하는 메시지가 표시되면 선택한 미디어에 대한 액세스를 제한하는 사용자에게는 앱이 소유한 사진이 사진 선택 도구에서 미리 선택된 상태로 표시됩니다. 사용자는 이러한 사전 선택된 항목을 선택 해제할 수 있으며, 이 경우 앱의 사진 및 동영상 액세스 권한이 취소됩니다.