Davranış değişiklikleri: tüm uygulamalar

Android 14 platformu, uygulamanızı etkileyebilecek davranış değişiklikleri içerir. Aşağıdaki davranış değişiklikleri, targetSdkVersion sürümünden bağımsız olarak Android 14 ile çalışan tüm uygulamalar için geçerlidir. Uygulamanızı test etmeli ve ardından uygun olduğu durumlarda bunları doğru bir şekilde desteklemek için gereken değişiklikleri yapmalısınız.

Yalnızca Android 14'ü hedefleyen uygulamaları etkileyen davranış değişiklikleri listesini de incelemeyi unutmayın.

Temel işlevler

Tam alarm planlama işlemi varsayılan olarak reddedilir

Tam alarmlar, kullanıcıların istediği bildirimlere veya belirli bir zamanda gerçekleşmesi gereken işlemlere yöneliktir. Android 14'ten itibaren SCHEDULE_EXACT_ALARM izni, Android 13 ve sonraki sürümleri hedefleyen yeni yüklenen uygulamaların çoğuna artık önceden verilmeyecek. İzin varsayılan olarak reddedilir.

Tam alarmları planlama izninde yapılan değişiklikler hakkında daha fazla bilgi edinin.

Uygulamalar önbelleğe alınırken bağlama kayıtlı yayınlar sıraya alınır

On Android 14, the system can place context-registered broadcasts in a queue while the app is in the cached state. This is similar to the queuing behavior that Android 12 (API level 31) introduced for async binder transactions. Manifest-declared broadcasts aren't queued, and apps are removed from the cached state for broadcast delivery.

When the app leaves the cached state, such as returning to the foreground, the system delivers any queued broadcasts. Multiple instances of certain broadcasts might be merged into one broadcast. Depending on other factors, such as system health, apps might be removed from the cached state, and any previously queued broadcasts are delivered.

Uygulamalar yalnızca kendi arka plan işlemlerini sona erdirebilir

Starting in Android 14, when your app calls killBackgroundProcesses(), the API can kill only the background processes of your own app.

If you pass in the package name of another app, this method has no effect on that app's background processes, and the following message appears in Logcat:

Invalid packageName: com.example.anotherapp

Your app shouldn't use the killBackgroundProcesses() API or otherwise attempt to influence the process lifecycle of other apps, even on older OS versions. Android is designed to keep cached apps in the background and kill them automatically when the system needs memory. If your app kills other apps unnecessarily, it can reduce system performance and increase battery consumption by requiring full restarts of those apps later, which takes significantly more resources than resuming an existing cached app.

MTU isteyen ilk GATT istemcisi için MTU 517 olarak ayarlanır.

Android Bluetooth grubu, Android 14'ten itibaren Bluetooth Core Spesifikasyonu'nun 5.2 sürümüne daha sıkı bir şekilde bağlıdır ve ilk GATT istemcisi BluetoothGatt#requestMtu(int) API'yi kullanarak bir MTU isteğinde bulunduğunda BLE ATT MTU'dan 517 bayt ister ve bu EKL bağlantısıyla ilgili sonraki tüm MTU isteklerini göz ardı eder.

Bu değişikliği ele almak ve uygulamanızı daha güçlü hale getirmek için aşağıdaki seçenekleri değerlendirin:

  • Çevre birimi cihazınız, Android cihazın MTU isteğine çevre biriminin karşılayabileceği makul bir değerle yanıt vermelidir. Müzakere edilen nihai değer, en az Android için istenen değer ve uzaktan sağlanan değer (örneğin, min(517, remoteMtu)) olur
    • Bu düzeltmenin uygulanması çevre birimi için donanım yazılımı güncellemesi gerektirebilir
  • Alternatif olarak, GATT özellik yazma işlemlerinizi, çevre biriminizin bilinen desteklenen değeri ve alınan MTU değişikliği arasındaki minimum değer üzerinden sınırlandırın.
    • Üstbilgiler için desteklenen boyuttan 5 bayt azaltmanız gerektiğini
    • Örneğin: arrayMaxLength = min(SUPPORTED_MTU, GATT_MAX_ATTR_LEN(517)) - 5

Bir uygulamanın kısıtlanmış bekleme paketine yerleştirilmesinin yeni nedeni

Android 14 introduces a new reason an app can be placed into the restricted standby bucket. The app's jobs trigger ANR errors multiple times due to onStartJob, onStopJob, or onBind method timeouts. (See JobScheduler reinforces callback and network behavior for changes to onStartJob and onStopJob.)

To track whether or not the app has entered the restricted standby bucket, we recommend logging with the API UsageStatsManager.getAppStandbyBucket() on job execution or UsageStatsManager.queryEventsForSelf() on app startup.

Mlock 64 KB ile sınırlı

Platform, Android 14 (API düzeyi 34) ve sonraki sürümlerde mlock() kullanılarak kilitlenebilen maksimum belleği işlem başına 64 KB'a düşürmektedir. Önceki sürümlerde sınır işlem başına 64 MB'tı. Bu kısıtlama, uygulamalar ve sistem genelinde bellek yönetimini iyileştirir. Android 14, cihazlar arasında daha fazla tutarlılık sağlamak amacıyla uyumlu cihazlarda yeni mlock() sınırı için yeni bir CTS testi ekler.

Sistem, önbelleğe alınan uygulama kaynak kullanımını zorunlu kılar

By design, an app's process is in a cached state when it's moved to the background and no other app process components are running. Such an app process is subject to being killed due to system memory pressure. Any work that Activity instances perform after the onStop() method has been called and returned, while in this state, is unreliable and strongly discouraged.

Android 14 introduces consistency and enforcement to this design. Shortly after an app process enters a cached state, background work is disallowed, until a process component re-enters an active state of the lifecycle.

Apps that use typical framework-supported lifecycle APIs – such as services, JobScheduler, and Jetpack WorkManager – shouldn't be impacted by these changes.

Kullanıcı deneyimi

Kullanıcıların kapatılamayan bildirimlerle ilgili deneyimiyle ilgili değişiklikler

If your app shows non-dismissable foreground notifications to users, Android 14 has changed the behavior to allow users to dismiss such notifications.

This change applies to apps that prevent users from dismissing foreground notifications by setting Notification.FLAG_ONGOING_EVENT through Notification.Builder#setOngoing(true) or NotificationCompat.Builder#setOngoing(true). The behavior of FLAG_ONGOING_EVENT has changed to make such notifications actually dismissable by the user.

These kinds of notifications are still non-dismissable in the following conditions:

  • When the phone is locked
  • If the user selects a Clear all notification action (which helps with accidental dismissals)

Also, this new behavior doesn't apply to notifications in the following use cases:

  • CallStyle notifications
  • Device policy controller (DPC) and supporting packages for enterprise
  • Media notifications
  • The default Search Selector package

Veri Güvenliği bilgileri artık daha görünür

Android 14, kullanıcı gizliliğini iyileştirmek için Play Console formunda beyan ettiğiniz bilgilerin sistem tarafından gösterildiği yer sayısını artırır. Şu anda kullanıcılar bu bilgileri uygulamanızın Google Play'deki girişindeki Veri Güvenliği bölümünde görüntüleyebilirler.

Uygulamanızın konum verileri paylaşım politikalarını incelemenizi ve uygulamanızın Google Play Veri Güvenliği bölümünde geçerli güncellemeleri yapmak için bir dakikanızı ayırmanızı öneririz.

Daha fazla bilgiyi Android 14'te veri güvenliği bilgilerinin nasıl daha görünür olduğu ile ilgili kılavuzdan edinebilirsiniz.

Erişilebilirlik

Doğrusal olmayan yazı tipi boyutunu %200'e ölçeklendirme

Sistem, Android 14'ten itibaren %200'e kadar yazı tipi ölçeklendirmesini destekleyerek az gören kullanıcılara Web İçeriği Erişilebilirlik Yönergeleri (WCAG) ile uyumlu ek erişilebilirlik seçenekleri sağlar.

Metin boyutunu tanımlamak için zaten ölçeklendirilmiş piksel (sp) birimleri kullanıyorsanız bu değişikliğin uygulamanız üzerinde büyük bir etkisi olmayacaktır. Ancak uygulamanızın kullanılabilirliği etkilemeden daha büyük yazı tipi boyutlarına uyum sağlayabildiğinden emin olmak için kullanıcı arayüzü testini maksimum yazı tipi boyutu etkinken (%200) yapmanız gerekir.

Güvenlik

Minimum yüklenebilir hedef API düzeyi

Starting with Android 14, apps with a targetSdkVersion lower than 23 can't be installed. Requiring apps to meet these minimum target API level requirements improves security and privacy for users.

Malware often targets older API levels in order to bypass security and privacy protections that have been introduced in newer Android versions. For example, some malware apps use a targetSdkVersion of 22 to avoid being subjected to the runtime permission model introduced in 2015 by Android 6.0 Marshmallow (API level 23). This Android 14 change makes it harder for malware to avoid security and privacy improvements. Attempting to install an app targeting a lower API level will result in an installation failure, with the following message appearing in Logcat:

INSTALL_FAILED_DEPRECATED_SDK_VERSION: App package must target at least SDK version 23, but found 7

On devices upgrading to Android 14, any apps with a targetSdkVersion lower than 23 will remain installed.

If you need to test an app targeting an older API level, use the following ADB command:

adb install --bypass-low-target-sdk-block FILENAME.apk

Medya sahibi paket adları çıkartılabilir

The media store supports queries for the OWNER_PACKAGE_NAME column, which indicates the app that stored a particular media file. Starting in Android 14, this value is redacted unless at least one of the following conditions is true:

  • The app that stored the media file has a package name that is always visible to other apps.
  • The app that queries the media store requests the QUERY_ALL_PACKAGES permission.

Learn more about how Android filters package visibility for privacy purposes.