動作の変更点: すべてのアプリ

Android 15 プラットフォームには、アプリに影響する可能性がある動作変更が含まれています。 Android 15 で実行されるすべてのアプリに以下の動作変更が適用されます。 targetSdkVersion に関係なく適用されます。アプリをテストしてから 必要に応じて適切にサポートします

アプリにのみ影響する動作変更のリストも必ずご確認ください。 Android 15 がターゲットです

コア機能

Android 15 では、Android システムのさまざまなコア機能を変更または拡張しています。

パッケージ停止状態の変更

パッケージ FLAG_STOPPED 状態(ユーザーがアプリアイコンを長押しして [強制停止] を選択することで AOSP ビルドを開始できる状態)の目的は、ユーザーがアプリを直接起動するか、(共有シートまたはウィジェットを介して、アプリをライブ壁紙としてアプリを選択などして)間接的に操作して、この状態からアプリを明示的に削除するまで、アプリをこの状態に保つことです。Android 15 では、この意図された動作に合わせてシステムの動作を更新しています。アプリは、直接または間接のユーザー操作によってのみ、停止状態から解除する必要があります。

意図した動作をサポートするために、Android 15 を搭載したデバイスでアプリが停止状態になると、既存の制限に加えて、システムは保留中のインテントもすべてキャンセルします。ユーザーの操作によってアプリが停止状態を解除すると、ACTION_BOOT_COMPLETED ブロードキャストがアプリに配信され、保留中のインテントを再登録する機会が提供されます。

新しい ApplicationStartInfo.wasForceStopped() メソッドを呼び出すと、アプリが停止状態に入ったかどうかを確認できます。

16 KB ページサイズのサポート

Historically, Android has only supported 4 KB memory page sizes, which has optimized system memory performance for the average amount of total memory that Android devices have typically had. Beginning with Android 15, AOSP supports devices that are configured to use a page size of 16 KB (16 KB devices). If your app uses any NDK libraries, either directly or indirectly through an SDK, then you will need to rebuild your app for it to work on these 16 KB devices.

As device manufacturers continue to build devices with larger amounts of physical memory (RAM), many of these devices will adopt 16 KB (and eventually greater) page sizes to optimize the device's performance. Adding support for 16 KB page size devices enables your app to run on these devices and helps your app benefit from the associated performance improvements. Without recompiling, apps might not work on 16 KB devices when they are productionized in future Android releases.

To help you add support for your app, we've provided guidance on how to check if your app is impacted, how to rebuild your app (if applicable), and how to test your app in a 16 KB environment using emulators (including Android 15 system images for the Android Emulator).

メリットとパフォーマンスの向上

ページサイズが 16 KB に設定されたデバイスは、平均でわずかに多くのメモリを使用しますが、システムとアプリの両方でさまざまなパフォーマンスの向上が得られます。

  • システムがメモリ不足の状況にあるときのアプリの起動時間が短縮: 平均で 3.16% 短縮され、テストした一部のアプリでは大幅な改善(最大 30%)を達成
  • アプリ起動時の消費電力の削減: 平均 4.56% を削減
  • カメラの起動の高速化: ホットスタートが平均 4.48% 高速化、コールド スタートが平均 6.60% 高速化
  • システムの起動時間の改善: 平均 1.5%(約 0.8 秒)改善

これらの改善は初期テストに基づくため、実際のデバイスでの結果とは異なる可能性があります。Google はテストを継続し、アプリの潜在的な利点に関して追加の分析を提供します。

アプリが影響を受けるかどうかを確認する

If your app uses any native code, then you should rebuild your app with support for 16 KB devices. If you are unsure if your app uses native code, you can use the APK Analyzer to identify whether any native code is present.

If your app only uses code written in the Java programming language or in Kotlin, including all libraries or SDKs, then your app already supports 16 KB devices. Nevertheless, we recommend that you test your app in a 16 KB environment to verify that there are no unexpected regressions in app behavior.

プライベート スペースをサポートするために一部のアプリで必要な変更

Private space is a new feature in Android 15 that lets users create a separate space on their device where they can keep sensitive apps away from prying eyes, under an additional layer of authentication. Because apps in the private space have restricted visibility, some types of apps need to take additional steps to be able to see and interact with apps in a user's private space.

All apps

Because apps in the private space are kept in a separate user profile, similar to work profiles, apps shouldn't assume that any installed copies of their app that aren't in the main profile are in the work profile. If your app has logic related to work profile apps that make this assumption, you'll need to adjust this logic.

Medical apps

When a user locks the private space, all apps in the private space are stopped, and those apps can't perform foreground or background activities, including showing notifications. This behavior might critically impact the use and function of medical apps installed in the private space.

The private space setup experience warns users that the private space is not suitable for apps that need to perform critical foreground or background activities, such as showing notifications from medical apps. However, apps can't determine whether or not they're being used in the private space, so they can't show a warning to the user for this case.

For these reasons, if you develop a medical app, review how this feature might impact your app and take appropriate actions—such as informing your users not to install your app in the private space—to avoid disrupting critical app capabilities.

Launcher apps

If you develop a launcher app, you must do the following before apps in the private space will be visible:

  1. Your app must be assigned as the default launcher app for the device—that is, possessing the ROLE_HOME role.
  2. Your app must declare the ACCESS_HIDDEN_PROFILES normal permission in your app's manifest file.

Launcher apps that declare the ACCESS_HIDDEN_PROFILES permission must handle the following private space use cases:

  1. Your app must have a separate launcher container for apps installed in the private space. Use the getLauncherUserInfo() method to determine which type of user profile is being handled.
  2. The user must be able to hide and show the private space container.
  3. The user must be able to lock and unlock the private space container. Use the requestQuietModeEnabled() method to lock (by passing true) or unlock (by passing false) the private space.
  4. While locked, no apps in the private space container should be visible or discoverable through mechanisms such as search. Your app should register a receiver for the ACTION_PROFILE_AVAILABLE and ACTION_PROFILE_UNAVAILABLE broadcasts and update the UI in your app when the locked or unlocked state of the private space container changes. Both of these broadcasts include EXTRA_USER, which your app can use to refer to the private profile user.

    You can also use the isQuietModeEnabled() method to check whether the private space profile is locked or not.

App store apps

The private space includes an "Install Apps" button that launches an implicit intent to install apps into the user's private space. In order for your app to receive this implicit intent, declare an <intent-filter> in your app's manifest file with a <category> of CATEGORY_APP_MARKET.

PNG ベースの絵文字フォントを削除

以前の PNG ベースの絵文字フォント ファイル(NotoColorEmojiLegacy.ttf)は、 ベクトルベースのファイルだけが残ります。Android 13(API)以降 レベル 33)、システム絵文字レンダラで使用される絵文字フォント ファイルは、 PNG ベースのファイルからベクターベースのファイルに変換できます。システムが保持する 互換性の理由から Android 13 および 14 の従来のフォント ファイルを変更せず、 独自のフォント レンダラを使用するアプリでは、従来のフォント ファイルを引き続き使用できます。 アップグレードが可能になるまで待つ必要は ありません

アプリが影響を受けるかどうかを確認するには、アプリのコードで NotoColorEmojiLegacy.ttf ファイル。

アプリは、いくつかの方法で適応させることができます。

  • テキストのレンダリングにはプラットフォーム API を使用します。ビットマップ ベースの形式にテキストをレンダリングできます。 Canvas を実行し、必要に応じてそれを使用して RAW 画像を取得します。
  • アプリに COLRv1 フォント サポートを追加します。FreeType オープンソース ライブラリ バージョン 2.13.0 の COLRv1 をサポートしており、 高くなります。
  • 最後の手段として、以前の絵文字フォント ファイルをバンドルして (NotoColorEmoji.ttf)を APK に追加します。 ただし、その場合は最新の絵文字アップデートがアプリに含まれません。対象 詳しくは、Noto 絵文字 GitHub プロジェクト ページをご覧ください

最小対象 SDK バージョンを 23 から 24 に引き上げ

Android 15 は、 Android 14 で行われた変更を セキュリティをさらに強化できます。Android 15 では、 24 未満の targetSdkVersion はインストールできません。 アプリが最新の API レベルを満たすことを必須にすることで、セキュリティと プライバシーを保護する。

マルウェアはセキュリティとプライバシーをすり抜けるために、低い API レベルをターゲットにすることが多い Android の上位バージョンで導入された保護機能。たとえば、一部のマルウェア アプリは、2015 年に Android 6.0 Marshmallow(API レベル 23)で導入された実行時の権限モデルの対象にならないよう、22 の targetSdkVersion を使用します。この Android 15 の変更により、マルウェアによるセキュリティの回避が難しくなる プライバシーが改善されます下位の API をターゲットとするアプリをインストールしようとする インストールが失敗すると、次のようなメッセージが表示されます。 Logcat に表示されます:

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

Android 15 にアップグレードするデバイスで、targetSdkVersion 未満のアプリ インストールしたままになります。

古い API レベルをターゲットとするアプリをテストする必要がある場合は、次の ADB コマンドを使用します。

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

カメラとメディア

Android 15 では、すべてのカメラとメディアの動作が次のように変更されます。 。

直接再生とオフロード音声再生で、リソースの上限に達すると、以前開いていたダイレクト トラックまたはオフロード オーディオ トラックが無効になるようになりました

Android 15 より前では、アプリが音声を再生しているときに、アプリが音声再生の直接またはオフロードをリクエストし、リソース制限に達した場合、アプリは新しい AudioTrack を開くことができませんでした。

Android 15 以降では、アプリがダイレクト再生またはオフロード再生をリクエストし、リソースの上限に達すると、現在開いている AudioTrack オブジェクトがすべて無効になり、新しいトラック リクエストを実行できなくなります。

(通常、ダイレクト オーディオ トラックとオフロード オーディオ トラックは圧縮音声形式の再生用に開きます。ダイレクト オーディオを再生する一般的なユースケースとして、エンコードされたオーディオを HDMI 経由でテレビにストリーミングすることがあります。オフロード トラックは通常、ハードウェア DSP アクセラレーションを備えたモバイル デバイスで圧縮音声を再生するために使用されます)。

ユーザー エクスペリエンスとシステム UI

Android 15 では、一貫性を保ち、 直感的に操作できます

予測型「戻る」アニメーションをオプトインしたアプリで有効にする

Beginning in Android 15, the developer option for predictive back animations has been removed. System animations such as back-to-home, cross-task, and cross-activity now appear for apps that have opted in to the predictive back gesture either entirely or at an activity level. If your app is affected, take the following actions:

  • Ensure that your app has been properly migrated to use the predictive back gesture.
  • Ensure that your fragment transitions work with predictive back navigation.
  • Migrate away from animation and framework transitions and use animator and androidx transitions instead.
  • Migrate away from back stacks that FragmentManager doesn't know about. Use back stacks managed by FragmentManager or by the Navigation component instead.

ユーザーがアプリを強制停止したときにウィジェットが無効になる

Android 15 を搭載したデバイスでユーザーがアプリを強制停止すると、そのアプリのウィジェットがすべて一時的に無効になります。ウィジェットはグレー表示され、ユーザーは操作できません。これは、Android 15 以降、アプリが強制停止されると、システムがアプリのペンディング インテントをすべてキャンセルするためです。

ウィジェットは、ユーザーが次にアプリを起動したときに、再び有効になります。

詳しくは、パッケージ停止状態の変更をご覧ください。

サポートの終了

各リリースで、特定の Android API が古くなったり、廃止する必要があったりします。 デベロッパー エクスペリエンスの向上や新しいプラットフォームのサポートのためにリファクタリングされた 提供しますそのような場合は、廃止された API を正式に非推奨化し、 代わりに使用する代替 API をデベロッパーに提示します。

非推奨とは、API の公式サポートを終了したことですが、今後 引き続きデベロッパーが利用できるようになっています。注目すべきトピックについて 非推奨に関するページをご覧ください。