パフォーマンスと信頼性のベスト プラクティス
コレクションでコンテンツを整理
必要に応じて、コンテンツの保存と分類を行います。
メディアアプリは、メモリ、CPU、ネットワーク接続、ハードウェア コーデックなど、多くのリソースを必要とする可能性があり、その多くがリソースが不足しています。また、アプリは他のアプリとの連携(再生コマンド リクエストを送信するコントローラ アプリや、システム内の別の場所でメディアの再生を開始するなど)を確実に管理する必要があります。このセクションでは、ユーザーがアプリを使用して期待どおりのパフォーマンスを実現するためのベスト プラクティスについて説明します。
このページのコンテンツやコードサンプルは、コンテンツ ライセンスに記載のライセンスに従います。Java および OpenJDK は Oracle および関連会社の商標または登録商標です。
最終更新日 2025-07-26 UTC。
[null,null,["最終更新日 2025-07-26 UTC。"],[],[],null,["# Best practices for performance and reliability\n\nMedia apps can demand a lot of resources including memory, CPU, network\nconnections and hardware codecs, many of which are in short supply.\nIn addition, apps have to reliably manage interacting with other apps, such as\ncontroller apps sending playback command requests or media playback starting\nelsewhere in the system. This section discusses best practices for making sure\nthat users can rely on your app to perform well and as expected.\n\n- Use testing tools like the [Media Controller Test app](/media/optimize/mct) to validate your playback use-cases\n- Use a device's [performance class](/topic/performance/performance-class) level to accurately gauge device capabilities\n- Cooperate with other apps to [manage audio focus](/media/optimize/audio-focus)\n- [Measure](/media/optimize/performance/measure) your app's performance and make decisions accordingly\n- Maintain high quality when preparing to [share videos](/media/optimize/sharing)"]]