동작 변경사항: 모든 앱

Android 17 플랫폼에는 앱에 영향을 줄 수 있는 동작 변경사항이 있습니다. targetSdkVersion과 관계없이 Android 17에서 실행되는 모든 앱에 적용되는 동작 변경사항은 다음과 같습니다. 이러한 변경사항을 적절히 지원해야 하는 경우 앱을 테스트한 후 필요에 따라 수정해야 합니다.

또한 Android 17을 타겟팅하는 앱에만 영향을 주는 동작 변경사항 목록을 검토해야 합니다.

보안

Android 17에는 기기 및 앱 보안이 다음과 같이 개선되었습니다.

usesClearTraffic 지원 중단 계획

향후 출시에서는 usesCleartextTraffic 요소를 지원 중단할 계획입니다. 암호화되지 않은 (HTTP) 연결을 만들어야 하는 앱은 네트워크 보안 구성 파일을 사용하도록 이전해야 합니다. 이 파일을 사용하면 앱이 일반 텍스트 연결을 만들어야 하는 도메인을 지정할 수 있습니다.

네트워크 보안 구성 파일은 API 수준 24 이상에서만 지원됩니다. 앱의 최소 API 수준이 24 미만인 경우 다음 두 가지를 모두 실행해야 합니다.

  • usesCleartextTraffic 속성을 true로 설정
  • 네트워크 구성 파일 사용

앱의 최소 API 수준이 24 이상이면 네트워크 구성 파일을 사용할 수 있으며 usesCleartextTraffic를 설정하지 않아도 됩니다.

암시적 URI 권한 부여 제한

현재 앱이 Send, SendMultiple 또는 ImageCapture 작업이 있는 URI로 인텐트를 실행하면 시스템에서 타겟 앱에 읽기 및 쓰기 URI 권한을 자동으로 부여합니다. Android 18에서는 이 동작을 변경할 계획입니다. 따라서 시스템에서 권한을 부여하도록 하는 대신 앱에서 관련 URI 권한을 명시적으로 부여하는 것이 좋습니다.

앱별 키 저장소 제한

Apps should avoid creating excessive numbers of keys in Android Keystore, because it is a shared resource for all apps on the device. Beginning with Android 17, the system enforces a limit on the number of keys an app can own. The limit is 50,000 keys for non-system apps targeting Android 17 (API level 37) or higher, and 200,000 keys for all other apps. System apps have a limit of 200,000 keys, regardless of which API level they target.

If an app attempts to create keys beyond the limit, the creation fails with a KeyStoreException. The exception's message string contains information about the key limit. If the app calls getNumericErrorCode() on the exception, the return value depends on what API level the app targets:

  • Apps targeting Android 17 (API level 37) or higher: getNumericErrorCode() returns the new ERROR_TOO_MANY_KEYS value.
  • All other apps: getNumericErrorCode() returns ERROR_INCORRECT_USAGE.

사용자 환경 및 시스템 UI

Android 17에는 더 일관되고 직관적인 사용자 환경을 만들기 위한 다음 변경사항이 포함되어 있습니다.

회전 후 기본 IME 공개 상태 복원

Android 17부터 기기의 구성이 변경되고 (예: 회전을 통해) 앱 자체에서 이를 처리하지 않으면 이전 IME 가시성이 복원되지 않습니다.

앱이 처리하지 않는 구성 변경이 발생하고 변경 후 앱에 키보드가 표시되어야 하는 경우 이를 명시적으로 요청해야 합니다. 다음 방법 중 하나로 요청할 수 있습니다.

  • android:windowSoftInputMode 속성을 stateAlwaysVisible으로 설정합니다.
  • 활동의 onCreate() 메서드에서 프로그래매틱 방식으로 가상 키보드를 요청하거나 onConfigurationChanged() 메서드를 추가합니다.

사람의 입력

Android 17에는 앱이 키보드, 터치패드와 같은 사람 입력 기기와 상호작용하는 방식에 영향을 미치는 다음과 같은 변경사항이 포함되어 있습니다.

터치패드는 포인터 캡처 중에 기본적으로 상대 이벤트를 제공합니다.

Beginning with Android 17, if an app requests pointer capture using View.requestPointerCapture() and the user uses a touchpad, the system recognizes pointer movement and scrolling gestures from the user's touches and reports them to the app in the same way as pointer and scroll wheel movements from a captured mouse. In most cases, this removes the need for apps that support captured mice to add special handling logic for touchpads. For more details, see the documentation for View.POINTER_CAPTURE_MODE_RELATIVE.

Previously, the system did not attempt to recognize gestures from the touchpad, and instead delivered the raw, absolute finger locations to the app in a similar format to touchscreen touches. If an app still requires this absolute data, it should call the new View.requestPointerCapture(int) method with View.POINTER_CAPTURE_MODE_ABSOLUTE instead.

미디어

Android 17에는 미디어 동작이 다음과 같이 변경되었습니다.

백그라운드 오디오 강화

Android 17부터 오디오 프레임워크는 오디오 재생, 오디오 포커스 요청, 볼륨 변경 API를 비롯한 백그라운드 오디오 상호작용에 관한 제한사항을 적용하여 이러한 변경사항이 사용자에 의해 의도적으로 시작되도록 합니다.

앱이 유효한 수명 주기에 있지 않은 동안 오디오 API를 호출하려고 하면 예외를 발생시키거나 실패 메시지를 제공하지 않고 오디오 재생 및 볼륨 변경 API가 자동으로 실패합니다. 오디오 포커스 API가 결과 코드 AUDIOFOCUS_REQUEST_FAILED로 실패합니다.

완화 전략을 비롯한 자세한 내용은 백그라운드 오디오 강화를 참고하세요.

연결

Android 17에는 기기 연결을 강화하기 위해 다음과 같은 변경사항이 포함되어 있습니다.

블루투스 연결 손실 시 자동 재페어링

Android 17 introduces autonomous re-pairing, a system-level enhancement designed to automatically resolve Bluetooth bond loss.

Previously, if a bond was lost, users had to manually navigate to Settings to unpair and then re-pair the peripheral. This feature builds upon the security improvement of Android 16 by allowing the system to re-establish bonds in the background without requiring users to manually navigate to Settings to unpair and re-pair peripherals.

While most apps will not require code changes, developers should be aware of the following behavior changes in Bluetooth stack:

  • New pairing context: The ACTION_PAIRING_REQUEST now includes the EXTRA_PAIRING_CONTEXT extra which allows apps to distinguish between a standard pairing request and an autonomous system-initiated re-pairing attempt.
  • Conditional key updates: Existing security keys will only be replaced if the re-pairing is successful and new connection meets or exceeds the security level of the previous bond.
  • Modified intent timing: The ACTION_KEY_MISSING intent is now broadcast only if the autonomous re-pairing attempt fails. This reduces unnecessary error handling in the app if the system successfully recovers the bond in the background.
  • User notification: The system manages re-pairing via new UI notifications and dialogs. Users will be prompted to confirm the re-pairing attempt to ensure they are aware of the reconnection.

Peripheral device manufacturers and companion app developers should verify that hardware and app gracefully handle bond transitions. To test this behavior, simulate a remote bond loss using either of the following methods:

  • Manually remove the bond information from the peripheral device
  • Manually unpair the device in: Settings > Connected devices