Kể từ ngày 27 tháng 3 năm 2025, bạn nên sử dụng android-latest-release
thay vì aosp-main
để xây dựng và đóng góp cho AOSP. Để biết thêm thông tin, hãy xem phần Thay đổi đối với AOSP.
Bluetooth
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.
Mô-đun Bluetooth là một mô-đun Mainline không bắt buộc được giới thiệu trong Android 13.
Trong Android 16 trở lên, mô-đun này có thể cập nhật và chứa một ngăn xếp máy chủ Bluetooth chế độ kép được chứng nhận đầy đủ, cho phép các thiết bị Android hỗ trợ cả chức năng Bluetooth cổ điển và Bluetooth năng lượng thấp (BLE).
Động lực chính cho mô-đun Bluetooth là cung cấp trải nghiệm Bluetooth chất lượng cao hơn cho các nhà sản xuất thiết bị, người dùng và nhà phát triển ứng dụng bằng cách:
Cung cấp các bản cập nhật nhanh hơn với các tính năng mới, bản sửa lỗi, các điểm cải tiến về khả năng tương tác và bản vá bảo mật một cách nhanh chóng và thường xuyên, độc lập với chu kỳ phát hành hệ điều hành Android.
Giảm tình trạng phân mảnh và tạo trải nghiệm nhất quán cho toàn bộ hệ sinh thái Android.
Đơn giản hoá quá trình phát triển của đối tác bằng cách phân phối các mô-đun Mainline Bluetooth đã được Android xác thực và tránh việc thường xuyên điều chỉnh lại cơ sở, nhờ đó giảm chi phí phát triển và kiểm thử.
Mô-đun Bluetooth sử dụng định dạng APEX. Gói com.google.android.bt
chứa APK Bluetooth được xác định trong packages/modules/Bluetooth/android/app
, thư viện tích hợp libbluetooth_jni.so
, các API trong packages/modules/Bluetooth/framework/java/android/bluetooth
và các giao diện HIDL.
Ranh giới mô-đun
Sơ đồ sau đây cho thấy ranh giới của mô-đun Bluetooth:
Hình 1 Ranh giới của mô-đun Bluetooth.
Phần phụ thuộc
Mô-đun Bluetooth có các phần phụ thuộc sau:
- Mức sử dụng API
@hide
cho dữ liệu đến và đi
- Thư viện bắt buộc đối với APK Bluetooth (
libbluetooth.so
).
- Việc triển khai HAL của nhà cung cấp chipset Bluetooth
- Khung âm thanh Android để phát trực tuyến âm thanh
- Dịch vụ điện thoại Android để gọi điện
- Tính năng chia sẻ Internet trên Android cho Mạng khu vực cá nhân (PAN) qua Bluetooth
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,["# Bluetooth\n\nThe Bluetooth module is an optional Mainline module introduced in Android 13.\nIn Android 16 and higher, the module is updatable and contains a fully\ncertified dual-mode Bluetooth host stack, enabling Android devices to support\nboth classic Bluetooth and Bluetooth Low Energy (BLE) functionalities.\n\nThe primary motivation for the Bluetooth module is to provide a higher-quality\nBluetooth experience to device manufacturers, users, and app developers by:\n\n- **Delivering faster updates** with new features, bug fixes, interoperability\n enhancements, and security patches quickly and regularly, independently of\n the Android OS release cycle.\n\n- **Reducing fragmentation** and creating a consistent experience for the\n entire Android ecosystem.\n\n- **Streamlining partner development** by delivering Android-validated\n Bluetooth Mainline modules and avoiding frequent rebasing, thus reducing\n development and testing overhead.\n\nPackage format\n--------------\n\nThe Bluetooth module uses the [APEX](/docs/core/ota/apex) format. The `com.google.android.bt`\npackage contains the Bluetooth APK defined in\n`packages/modules/Bluetooth/android/app`, the built-in library\n`libbluetooth_jni.so`, the APIs under\n`packages/modules/Bluetooth/framework/java/android/bluetooth`, and the HIDL\ninterfaces.\n\nModule boundary\n---------------\n\nThe following diagram shows the Bluetooth module boundary:\n\n**Figure 1**. Bluetooth module boundary.\n\nDependencies\n------------\n\nThe Bluetooth module has dependencies on the following:\n\n- Incoming and outgoing `@hide` API usages\n- Library required for the Bluetooth APK (`libbluetooth.so`).\n- HAL implementation from the Bluetooth chipset provider\n- Android Audio Framework for audio streaming\n- Android telephony for phone calls\n- Android tethering for Bluetooth Personal Area Network (PAN)"]]