اعتبارًا من 27 آذار (مارس) 2025، ننصحك باستخدام android-latest-release
بدلاً من aosp-main
لإنشاء AOSP والمساهمة فيه. لمزيد من المعلومات، يُرجى الاطّلاع على التغييرات في AOSP.
البلوتوث
تنظيم صفحاتك في مجموعات
يمكنك حفظ المحتوى وتصنيفه حسب إعداداتك المفضّلة.
وحدة البلوتوث هي وحدة Mainline اختيارية تم طرحها في Android 13.
في الإصدار 16 من نظام التشغيل Android والإصدارات الأحدث، يمكن تحديث الوحدة وتحتوي على حزمة مضيف Bluetooth معتمدة بالكامل في الوضع المزدوج، ما يتيح لأجهزة Android إمكانية استخدام وظائف كلّ من Bluetooth العادي وBluetooth منخفض الطاقة (BLE).
الهدف الأساسي من وحدة Bluetooth هو تقديم تجربة Bluetooth عالية الجودة لمصنّعي الأجهزة والمستخدمين ومطوّري التطبيقات من خلال:
توفير التحديثات بشكل أسرع التي تتضمّن ميزات جديدة وإصلاحات للأخطاء وتحسينات في إمكانية التشغيل التفاعلي ورموز تصحيح الأمان بسرعة وبشكل منتظم، وبشكل مستقل عن دورة إصدار نظام التشغيل Android
الحدّ من التجزئة وتقديم تجربة متّسقة في
جميع أنحاء منظومة Android المتكاملة
تبسيط عملية تطوير الشركاء من خلال توفير وحدات Bluetooth Mainline التي تم التحقّق من صحتها على Android وتجنُّب إعادة التأسيس بشكل متكرر، ما يؤدي إلى تقليل تكاليف التطوير والاختبار.
تستخدم وحدة البلوتوث تنسيق APEX. تحتوي حزمة com.google.android.bt
على حزمة APK الخاصة بتقنية Bluetooth المحدّدة في packages/modules/Bluetooth/android/app
والمكتبة المضمّنة libbluetooth_jni.so
وواجهات برمجة التطبيقات ضمن packages/modules/Bluetooth/framework/java/android/bluetooth
وواجهات HIDL.
حدود الوحدة
يوضّح الرسم البياني التالي حدود وحدة Bluetooth:
الشكل 1 حدود وحدة البلوتوث
التبعيات
تعتمد وحدة البلوتوث على ما يلي:
@hide
استخدامات واجهة برمجة التطبيقات الواردة والصادرة
- المكتبة المطلوبة لحزمة APK الخاصة بالبلوتوث (
libbluetooth.so
)
- تنفيذ طبقة تجريد الأجهزة (HAL) من موفّر مجموعة شرائح البلوتوث
- إطار عمل Android Audio لبث الصوت
- خدمة الاتصال الهاتفي على Android للمكالمات الهاتفية
- التوصيل عبر البلوتوث في شبكة المنطقة الشخصية (PAN) على أجهزة Android
يخضع كل من المحتوى وعيّنات التعليمات البرمجية في هذه الصفحة للتراخيص الموضحّة في ترخيص استخدام المحتوى. إنّ Java وOpenJDK هما علامتان تجاريتان مسجَّلتان لشركة Oracle و/أو الشركات التابعة لها.
تاريخ التعديل الأخير: 2025-07-27 (حسب التوقيت العالمي المتفَّق عليه)
[[["يسهُل فهم المحتوى.","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 (حسب التوقيت العالمي المتفَّق عليه)"],[],[],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)"]]