27 Mart 2025'ten itibaren AOSP'yi derlemek ve AOSP'ye katkıda bulunmak için aosp-main
yerine android-latest-release
kullanmanızı öneririz. Daha fazla bilgi için AOSP'de yapılan değişiklikler başlıklı makaleyi inceleyin.
Bluetooth
Koleksiyonlar ile düzeninizi koruyun
İçeriği tercihlerinize göre kaydedin ve kategorilere ayırın.
Android, hem Klasik Bluetooth'u hem de Bluetooth Düşük Enerji'yi (BLE) destekleyen varsayılan bir Bluetooth yığını sağlar. Android cihazlar, Bluetooth'u kullanarak yakındaki Bluetooth cihazlarıyla veri göndermek ve almak için kişisel alan ağları oluşturabilir.
Android 4.3 ve sonraki sürümlerde Android Bluetooth yığını, BLE'yi uygulama olanağı sağlar. BDE API'lerini tam olarak kullanmak için Android Bluetooth HCI Gereksinimleri'ni uygulayın. Uygun yonga setine sahip Android cihazlar Classic Bluetooth'u veya hem Classic Bluetooth hem de BLE'yi uygulayabilir. BLE, eski Bluetooth yonga setleriyle geriye dönük uyumlu değildir.
Android 8.0'da Bluetooth yığını, Bluetooth 5 için tamamen niteliklidir. Kullanılabilir Bluetooth 5 özelliklerini kullanmak için cihazda Bluetooth 5 sertifikalı bir yonga seti olması gerekir.
Android mimarisi
Bir Bluetooth uygulaması, Binder aracılığıyla Bluetooth süreciyle iletişim kurar. Bluetooth
işlemi, Bluetooth yığınıyla iletişim kurmak için Java Native Interface'i (JNI) kullanır ve geliştiricilere çeşitli Bluetooth profillerine erişim sağlar. Bu şemada Bluetooth yığınının genel yapısı gösterilmektedir:

1.şekil Android Bluetooth mimarisi.
- uygulama çerçevesi
-
Uygulama çerçevesi düzeyinde, Bluetooth donanımıyla etkileşim kurmak için
android.bluetooth
API'lerini kullanan uygulama kodu bulunur. Bu kod, dahili olarak Binder IPC mekanizması aracılığıyla Bluetooth sürecini çağırır.
- Bluetooth uygulaması
-
packages/modules/Bluetooth/android/app
konumundaki Bluetooth uygulaması,
Android uygulaması olarak paketlenir ve Bluetooth profillerini Android çerçeve katmanında uygular. Bu uygulama, JNI aracılığıyla Bluetooth yığınına çağrı yapar.
- JNI
-
android.bluetooth
ile ilişkili JNI kodu, packages/modules/Bluetooth/android/app/jni
konumunda bulunur. JNI kodu, cihazların keşfedilmesi gibi belirli Bluetooth işlemleri gerçekleştiğinde Bluetooth yığınına çağrı yapar.
- Bluetooth yığını
-
Varsayılan Bluetooth yığını AOSP'de sağlanır ve
packages/modules/Bluetooth/system
konumunda bulunur. Yığın, genel Bluetooth HAL'ı uygular ve uzantılar ile yapılandırma değişiklikleriyle özelleştirir.
- tedarikçi uygulaması
-
Tedarikçi cihazları, HAL arayüz tanımı dili (HIDL) kullanılarak Bluetooth yığınıyla etkileşime girer.
HIDL
HIDL, Bluetooth yığını ile satıcı uygulaması arasındaki arayüzü tanımlar. Bluetooth HIDL dosyalarını oluşturmak için Bluetooth arayüz dosyalarını HIDL oluşturma aracına iletin. Arayüz dosyaları hardware/interfaces/bluetooth
konumunda bulunur.
Bluetooth yığını geliştirme
Android Bluetooth yığını, tam nitelikli bir Bluetooth yığınıdır. Uygunluk listesi, Bluetooth SIG web sitesinde (giriş yapılması gerekir) QDID 169365 altında yer alır.
Temel Bluetooth yığını
packages/modules/Bluetooth
içinde bulunur. Geliştirme AOSP'de yapılır ve katkılar kabul edilir.
Bu sayfadaki içerik ve kod örnekleri, İçerik Lisansı sayfasında açıklanan lisanslara tabidir. Java ve OpenJDK, Oracle ve/veya satış ortaklarının tescilli ticari markasıdır.
Son güncelleme tarihi: 2025-08-22 UTC.
[[["Anlaması kolay","easyToUnderstand","thumb-up"],["Sorunumu çözdü","solvedMyProblem","thumb-up"],["Diğer","otherUp","thumb-up"]],[["İhtiyacım olan bilgiler yok","missingTheInformationINeed","thumb-down"],["Çok karmaşık / çok fazla adım var","tooComplicatedTooManySteps","thumb-down"],["Güncel değil","outOfDate","thumb-down"],["Çeviri sorunu","translationIssue","thumb-down"],["Örnek veya kod sorunu","samplesCodeIssue","thumb-down"],["Diğer","otherDown","thumb-down"]],["Son güncelleme tarihi: 2025-08-22 UTC."],[],[],null,["# Bluetooth\n\nAndroid provides a default Bluetooth stack that supports both Classic Bluetooth and Bluetooth\nLow Energy (BLE). Using Bluetooth, Android devices can create personal area networks to send\nand receive data with nearby Bluetooth devices.\n\n\nIn Android 4.3 and higher, the Android Bluetooth stack provides the ability to implement\nBLE. To fully use the BLE APIs, follow the\n[Android Bluetooth HCI Requirements](/docs/core/connect/bluetooth/hci_requirements). Android devices with a qualified chipset can implement either Classic Bluetooth or both\nClassic Bluetooth and BLE. BLE isn't backward compatible with older Bluetooth chipsets.\n\n\nIn Android 8.0, the Bluetooth stack is fully qualified for Bluetooth 5. To use\navailable Bluetooth 5 features, the device needs to have a Bluetooth 5 qualified chipset.\n\nAndroid architecture\n--------------------\n\n\nA Bluetooth app communicates with the Bluetooth process through Binder. The Bluetooth\nprocess uses Java Native Interface (JNI) to communicate with the Bluetooth stack and provides\ndevelopers with access to various Bluetooth profiles. This diagram shows the general\nstructure of the Bluetooth stack:\n\n**Figure 1.** Android Bluetooth architecture.\n\napp framework\n:\n At the app framework level is app code, which uses the\n [`android.bluetooth`](http://developer.android.com/reference/android/bluetooth/package-summary.html)\n APIs to interact with the Bluetooth hardware. Internally, this code calls the Bluetooth\n process through the Binder IPC mechanism.\n\nBluetooth app\n:\n The Bluetooth app, located in `packages/modules/Bluetooth/android/app`,\n is packaged as an Android app and implements the Bluetooth profiles at the Android framework\n layer. This app calls into the Bluetooth stack through JNI.\n\nJNI\n:\n The JNI code associated with `android.bluetooth` is located in\n `packages/modules/Bluetooth/android/app/jni`. The JNI code calls into the\n Bluetooth stack when certain Bluetooth operations occur, such as when devices are\n discovered.\n\nBluetooth stack\n:\n The default Bluetooth stack is provided in AOSP and is located in\n `packages/modules/Bluetooth/system`. The stack implements the generic Bluetooth\n HAL and customizes it with extensions and configuration changes.\n\nvendor implementation\n:\n Vendor devices interact with the Bluetooth stack using the HAL interface definition\n language (HIDL).\n\n### HIDL\n\n\n[HIDL](/docs/core/architecture/hidl) defines the interface between the\nBluetooth stack and the vendor implementation. To generate the Bluetooth HIDL files, pass the\nBluetooth interface files into the HIDL generation tool. The interface files are located in\n[`hardware/interfaces/bluetooth`](https://android.googlesource.com/platform/hardware/interfaces/+/android16-release/bluetooth/).\n\n### Bluetooth stack development\n\n\nThe Android Bluetooth stack is a fully qualified Bluetooth stack. The qualification listing is\non the Bluetooth SIG website (requires sign-in) under\n[QDID 169365](https://launchstudio.bluetooth.com/ListingDetails/130825).\n\n\nThe core Bluetooth stack resides in\n[packages/modules/Bluetooth](https://cs.android.com/android/platform/superproject/+/android-latest-release:packages/modules/Bluetooth/). Development happens in AOSP, and contributions are welcome."]]