החל מ-27 במרץ 2025, מומלץ להשתמש ב-android-latest-release
במקום ב-aosp-main
כדי ליצור תרומות ל-AOSP. מידע נוסף זמין במאמר שינויים ב-AOSP.
Bluetooth
קל לארגן דפים בעזרת אוספים
אפשר לשמור ולסווג תוכן על סמך ההעדפות שלך.
מודול ה-Bluetooth הוא מודול Mainline אופציונלי שהוצג ב-Android 13.
ב-Android 16 ואילך, אפשר לעדכן את המודול והוא מכיל מחסנית מארח Bluetooth דו-מצבית עם אישור מלא, שמאפשרת למכשירי Android לתמוך בפונקציות של Bluetooth קלאסי ו-Bluetooth Low Energy (BLE).
הסיבה העיקרית ליצירת מודול ה-Bluetooth היא לספק חוויית Bluetooth באיכות גבוהה יותר ליצרני מכשירים, למשתמשים ולמפתחי אפליקציות, באמצעות:
אספקת עדכונים מהירים יותר עם תכונות חדשות, תיקוני באגים, שיפורים בתאימות ותיקוני אבטחה במהירות ובאופן קבוע, ללא תלות במחזור הגרסאות של מערכת ההפעלה Android.
צמצום הפיצול ויצירת חוויה עקבית בכל סביבת Android.
ייעול הפיתוח של שותפים על ידי אספקת מודולים של Bluetooth Mainline שאומתו על ידי Android, והימנעות משינוי בסיס קוד לעיתים קרובות, וכך הפחתת התקורה של הפיתוח והבדיקות.
מודול ה-Bluetooth משתמש בפורמט APEX. החבילה com.google.android.bt
מכילה את קובץ ה-APK של Bluetooth שמוגדר ב-packages/modules/Bluetooth/android/app
, את הספרייה המובנית libbluetooth_jni.so
, את ממשקי ה-API ב-packages/modules/Bluetooth/framework/java/android/bluetooth
ואת ממשקי ה-HIDL.
גבולות המודול
התרשים הבא מציג את הגבול של מודול ה-Bluetooth:
איור 1. הגבול של מודול ה-Bluetooth.
תלויות
מודול ה-Bluetooth תלוי ברכיבים הבאים:
- שימוש ב-API של
@hide
לתעבורה נכנסת ויוצאת
- ספרייה שנדרשת לחבילת ה-APK של Bluetooth (
libbluetooth.so
).
- הטמעה של HAL מספק ערכת השבבים של Bluetooth
- מסגרת Android Audio לסטרימינג של אודיו
- טלפוניה ב-Android לשיחות טלפון
- שיתוף אינטרנט ב-Android לרשת אזור אישית (PAN) באמצעות Bluetooth
דוגמאות התוכן והקוד שבדף הזה כפופות לרישיונות המפורטים בקטע רישיון לתוכן. Java ו-OpenJDK הם סימנים מסחריים או סימנים מסחריים רשומים של חברת Oracle ו/או של השותפים העצמאיים שלה.
עדכון אחרון: 2025-07-27 (שעון 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-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)"]]