Cronet を使用してネットワーク操作を実行する
コレクションでコンテンツを整理
必要に応じて、コンテンツの保存と分類を行います。
Cronet は、Android アプリがライブラリとして利用できるようにした Chromium ネットワーク スタックです。Cronet は、アプリの動作に必要なネットワーク リクエストのレイテンシを短縮し、スループットを向上させる複数のテクノロジーを活用します。
Cronet ライブラリは、YouTube、Google アプリ、Google フォト、マップ - ナビと乗換案内など、毎日何百万人ものユーザーが使用するアプリのリクエストを処理しています。
機能
- プロトコルのサポート
- Cronet は、HTTP、HTTP/2、HTTP/3 over QUIC プロトコルをネイティブにサポートしています。
- リクエストの優先順位付け
- ライブラリでは、リクエストの優先度タグを設定できます。サーバーは優先度タグを使用して、リクエストの処理順序を決定できます。
- リソース キャッシュ
- Cronet は、メモリ内キャッシュまたはディスク キャッシュを使用して、ネットワーク リクエストで取得したリソースを保存できます。後続のリクエストは、キャッシュから自動的に処理されます。
- 非同期リクエスト
- Cronet ライブラリを使用して発行されたネットワーク リクエストは、デフォルトでは非同期です。リクエストが戻されるのを待機している間、ワーカー スレッドがブロックされることはありません。
- データ圧縮
- Cronet は、Brotli 圧縮データ形式を使用したデータ圧縮をサポートしています。
Android 向けアプリで Cronet ライブラリを使用する方法については、シンプルなリクエストを送信するをご覧ください。また、GitHub の Cronet サンプルを参照することもできます。
Cronet ライブラリに関するフィードバックは、Chromium Issue Tracker を使用して送信できます。Issue Tracker のバグのリストで、問題がまだ報告されていないことを確認します。問題が報告されていない場合は、概要行に「Cronet」という単語を入れてバグを報告します。
このページのコンテンツやコードサンプルは、コンテンツ ライセンスに記載のライセンスに従います。Java および OpenJDK は Oracle および関連会社の商標または登録商標です。
最終更新日 2025-07-26 UTC。
[[["わかりやすい","easyToUnderstand","thumb-up"],["問題の解決に役立った","solvedMyProblem","thumb-up"],["その他","otherUp","thumb-up"]],[["必要な情報がない","missingTheInformationINeed","thumb-down"],["複雑すぎる / 手順が多すぎる","tooComplicatedTooManySteps","thumb-down"],["最新ではない","outOfDate","thumb-down"],["翻訳に関する問題","translationIssue","thumb-down"],["サンプル / コードに問題がある","samplesCodeIssue","thumb-down"],["その他","otherDown","thumb-down"]],["最終更新日 2025-07-26 UTC。"],[],[],null,["# Perform network operations using Cronet\n\nCronet is the Chromium network stack made available to Android apps as a\nlibrary. Cronet takes advantage of multiple technologies that reduce the latency\nand increase the throughput of the network requests that your app needs to work.\n\nThe Cronet Library handles the requests of apps used by millions of people on a\ndaily basis, such as\n[YouTube](https://play.google.com/store/apps/details?id=com.google.android.youtube),\n[Google App](https://play.google.com/store/apps/details?id=com.google.android.googlequicksearchbox),\n[Google Photos](https://play.google.com/store/apps/details?id=com.google.android.apps.photos),\nand [Maps - Navigation \\& Transit](https://play.google.com/store/apps/details?id=com.google.android.apps.maps).\n\nFeatures\n--------\n\n**Protocol support**\n: Cronet natively supports the\n [HTTP](https://tools.ietf.org/html/rfc2616),\n [HTTP/2](https://tools.ietf.org/html/rfc7540), and\n [HTTP/3 over QUIC](https://www.chromium.org/quic) protocols.\n\n**Request prioritization**\n: The library allows you to set a priority tag for the requests. The server can\n use the priority tag to determine the order in which to handle the requests.\n\n**Resource caching**\n: Cronet can use an in-memory or disk cache to store resources retrieved in\n network requests. Subsequent requests are served from the cache automatically.\n\n**Asynchronous requests**\n: Network requests issued using the Cronet Library are asynchronous by default.\n Your worker threads aren't blocked while waiting for the request to come back.\n\n**Data compression**\n: Cronet supports data compression using the\n [Brotli Compressed Data Format](https://tools.ietf.org/html/rfc7932).\n\nTo learn how to use the Cronet Library in your app for Android, see [Send a\nsimple request](/develop/connectivity/cronet/start). You can also\nbrowse the\n[Cronet Sample](https://github.com/GoogleChromeLabs/cronet-sample)\non GitHub.\n\nYou can send feedback about the Cronet Library using the [Chromium Issue\nTracker](https://crbug.com). Check the list of bugs in the issue tracker to make\nsure that your issue hasn't already been reported. If your issue hasn't been\nreported, file a bug with the word *Cronet* in the summary line."]]