Sử dụng Cronet với các thư viện khác
Sử dụng bộ sưu tập để sắp xếp ngăn nắp các trang
Lưu và phân loại nội dung dựa trên lựa chọn ưu tiên của bạn.
Cronet là một công cụ mạnh mẽ và linh hoạt có thể sử dụng kết hợp với các thư viện khác, mang lại sự tiện dụng, đơn giản và hiệu suất tốt nhất.
ExoPlayer
ExoPlayer hỗ trợ Cronet thông qua tiện ích Cronet của nó. Cronet được một số ứng dụng phát trực tuyến lớn nhất thế giới, bao gồm cả YouTube, sử dụng.
Để biết thêm thông tin chi tiết, hãy truy cập trang web của ExoPlayer.
gRPC (tổng tỷ lệ người xem)
Có thể dùng Cronet làm lớp truyền tải cho gRPC trên Android. Việc này cho phép ứng dụng Android của bạn tạo các RPC bằng cách sử dụng cùng một ngăn xếp mạng như dùng trong trình duyệt Chrome.
Để biết thêm thông tin, hãy truy cập vào kho lưu trữ gRPC.
OkHttp
Nhóm Cronet cung cấp một thư viện cho phép người dùng OkHttp sử dụng Cronet làm lớp truyền tải, hưởng lợi từ các tính năng như hỗ trợ QUIC/HTTP3 hoặc di chuyển kết nối. Bạn cũng có thể dùng thư viện này với các thư viện khác dựa trên OkHttp, chẳng hạn như Retrofit, Coil và các thư viện khác.
Để biết thêm thông tin, hãy truy cập vào Cronet Transport cho kho lưu trữ OkHttp.
Glide
Cronet là một lựa chọn mặc định phù hợp với Glide và sẽ mang lại hiệu suất tốt hơn so với cách tích hợp mặc định của Glide với ngăn xếp mạng Android tiêu chuẩn.
Để biết thêm thông tin, hãy truy cập vào trang web của Glide.
Dart
Có thể sử dụng Cronet trong Dart để thay thế cho gói dart:io
.
Để biết thêm thông tin chi tiết, hãy truy cập vào Kho lưu trữ các liên kết CRonet Dart và đọc bài đăng trên blog về quá trình hình thành của kho lưu trữ này!
Nội dung và mã mẫu trên trang này phải tuân thủ các giấy phép như mô tả trong phần Giấy phép nội dung. Java và OpenJDK là nhãn hiệu hoặc nhãn hiệu đã đăng ký của Oracle và/hoặc đơn vị liên kết của Oracle.
Cập nhật lần gần đây nhất: 2025-07-27 UTC.
[[["Dễ hiểu","easyToUnderstand","thumb-up"],["Giúp tôi giải quyết được vấn đề","solvedMyProblem","thumb-up"],["Khác","otherUp","thumb-up"]],[["Thiếu thông tin tôi cần","missingTheInformationINeed","thumb-down"],["Quá phức tạp/quá nhiều bước","tooComplicatedTooManySteps","thumb-down"],["Đã lỗi thời","outOfDate","thumb-down"],["Vấn đề về bản dịch","translationIssue","thumb-down"],["Vấn đề về mẫu/mã","samplesCodeIssue","thumb-down"],["Khác","otherDown","thumb-down"]],["Cập nhật lần gần đây nhất: 2025-07-27 UTC."],[],[],null,["# Use Cronet with other libraries\n\nCronet is a powerful and flexible tool that can be used in combination with\nother libraries, providing the best of utility, simplicity, and performance.\n\nExoPlayer\n---------\n\nExoPlayer natively supports Cronet through its Cronet extension. Cronet is used\nby some of the world's biggest streaming applications, including YouTube.\n\nFor more details, visit the [ExoPlayer site](https://exoplayer.dev/network-stacks.html#cronet).\n\ngRPC\n----\n\nCronet can be used as the transport layer for gRPC on Android. This lets your\nAndroid app make RPCs using the same networking stack as used in the Chrome\nbrowser.\n\nFor more details, visit the [gRPC repository](https://android.googlesource.com/platform/external/grpc-grpc-java/+/refs/heads/master/cronet/).\n\nOkHttp\n------\n\nThe Cronet team provides a library that enables\n[OkHttp](https://square.github.io/okhttp/) users to use Cronet as their\ntransport layer, benefiting from features like QUIC/HTTP3 support or connection\nmigration. The library can also be used with other OkHttp-based libraries\nsuch as [Retrofit](https://square.github.io/retrofit/),\n[Coil](https://coil-kt.github.io/coil/),\nand [others](https://square.github.io/okhttp/works_with_okhttp/).\n\nFor more details, visit the\n[Cronet Transport for OkHttp repository](https://github.com/google/cronet-transport-for-okhttp).\n\nGlide\n-----\n\nCronet is a good default choice with Glide and will provide better performance\nthan Glide's default integration with the standard Android networking stack.\n\nFor more details, visit the [Glide site](https://bumptech.github.io/glide/int/cronet.html).\n\nDart\n----\n\nCronet can be used in Dart as a drop-in replacement for the `dart:io` package.\n\nFor more details, visit the\n[Cronet Dart bindings repository](https://github.com/google/cronet.dart)\nand [read a blogpost](https://unsuitable001.medium.com/package-cronet-an-http-dart-flutter-package-with-dart-ffi-84f9b69c8a24)\nabout how it came to existence!"]]