バッテリーの節約について
コレクションでコンテンツを整理
必要に応じて、コンテンツの保存と分類を行います。
今日、ユーザーはメールの送信や財務管理から、動画のストリーミングやビデオゲームのストリーミングとプレイまで、ほぼすべてのことをモバイル デバイスで行っています。ほとんどのアプリは、リモート サービスからデータ、画像、その他のメディアを取得して、有用なものにしています。アプリはユーザーのデバイス上の多くのアプリの 1 つであり、それらすべてがネットワーク リソースを競合していることを忘れないでください。適切に管理されていない場合、バッテリーのパフォーマンスに大きな悪影響を及ぼし、ユーザーの限られたネットワーク帯域幅を不必要に使用する可能性があります。
Android 8.0 以降、バッテリー、ユーザー エクスペリエンス、システムの健全性を維持するのに役立ついくつかのアップデートが OS に導入されました。ただし、デベロッパー自身が採用できる考慮事項、戦略、パターンもいくつかあります。アプリがネットワークに対してリクエストを行うと、電力を大量に消費するモバイルデータ通信や Wi-Fi 通信がオンになるため、電池消耗の大きな原因となります。
このガイドでは、次のことについて説明します。
- アプリの接続モデルと無線通信のステートマシンの相互作用。
- データ接続の影響を最小限に抑える手法を適用する方法。
- 接続が遅い場合のトラブルシューティング方法。
- デバイスが充電中や Wi-Fi 接続時など、特定の条件下でのみバックグラウンド処理を実行する方法。
- アプリのバッテリー使用量の推移を追跡する方法。
最後に、ユーザー開始、アプリ開始、サーバー開始の 3 つの広範なカテゴリの更新について、各カテゴリの効率を最大化するためのツールと手法とともに説明します。
最終的には、ユーザーに最高のアプリ エクスペリエンスを提供することが、デベロッパー コミュニティ全体の責任となります。
その他の素材
このページのコンテンツやコードサンプルは、コンテンツ ライセンスに記載のライセンスに従います。Java および OpenJDK は Oracle および関連会社の商標または登録商標です。
最終更新日 2025-08-27 UTC。
[null,null,["最終更新日 2025-08-27 UTC。"],[],[],null,["Users rely on their mobile devices for virtually everything these days, from\nsending emails and managing finances, to streaming videos and streaming and\nplaying video games. In order to be useful, most apps require data, images, and\nother media from remote services. It's important to remember that your app is\njust one of many apps on the user's device, all competing for network resources.\nManaged poorly, this can have a dramatic and detrimental impact on battery\nperformance and unnecessarily use the user's limited network bandwidth.\n\nStarting with [Android 8.0](/about/versions/oreo/android-8.0-changes), several\nupdates were introduced to the OS which help preserve battery, user experience,\nand system health. However, there are additional considerations, strategies, and\npatterns that you as a developer can employ yourself, as well. Requests that\nyour app makes to the network can be a major cause of battery drain because\nthey rely on the heavily power-consuming cellular and Wi-Fi radios.\n\nIn this guide, you'll learn about the following:\n\n- How your app's connectivity model interacts with the wireless radio state machine.\n- How to employ techniques for minimizing the impact of your data connection.\n- How to troubleshoot slow connections.\n- How to run background work only under specific conditions such as when the device is charging or on Wi-Fi.\n- How to track your app's battery usage over time.\n\nFinally, you'll learn about three broad categories of updates:\n[User-initiated](/develop/connectivity/minimize-effect-regular-updates#user-initiated),\n[App-initiated](/develop/connectivity/minimize-effect-regular-updates#app-initiated),\nand\n[Server-initiated](/develop/connectivity/minimize-effect-regular-updates#server-initiated),\nwith tools and techniques for maximizing the efficiency of each category.\n\nUltimately, it's all of our responsibilities as a developer community to provide\nthe best app experience for our users.\n\nAdditional material"]]