Emülatörlerde Bluetooth sesini test etme
Koleksiyonlar ile düzeninizi koruyun
İçeriği tercihlerinize göre kaydedin ve kategorilere ayırın.
Wear OS emülatöründe, Wear OS 4 veya sonraki sürümleri çalıştıran sistem görüntüleri şunları içerir:
emüle Bluetooth desteği. Bu destek, çeşitli kullanım alanlarını test etmenize olanak tanır
Bluetooth sesiyle ilgili.
Emülasyonlu telefonla eşleme
Emülatörün Bluetooth desteğini kullanarak, emülasyonlu bir telefonla eşleme yapabilirsiniz. Alıcı:
komut satırından kurulum sihirbazını etkinleştirin:
-append-userspace-opt androidboot.setupwizard_mode=REQUIRED
Emüle edilmiş çıkış cihazı üzerinden ses çalma
Emülatörün Bluetooth desteğini kullanarak sesi bir
emüle edilmiş Bluetooth çıkış cihazı. Ses çıkışı geçişini test etmek için
emülatörü, açık kaynağı kullanarak emüle edilmiş bir Bluetooth çıkış cihazına bağlanın
Bumble projesi.
Ortamınızı hazırlama
Geliştirme makinenizi Bumble'ı kullanmaya hazırlamak için aşağıdaki adımları uygulayın:
için şu adımları izleyin:
Bumble kaynak kodunu getirin:
git clone https://github.com/google/bumble
bumble
dizinine gidin, ardından derleyip yükleyin
Bumble modülleri:
cd bumble && python3 -m pip install "."
Emülasyonlu Bluetooth hoparlörü başlat
Emülasyonlu hoparlörü başlatmak için aşağıdaki adımları uygulayın:
Emülatörün, Wear OS 4 veya sonraki sürümleri destekleyen bir sürümünü başlatın.
Not: Emülatör sürümü kullanıyorsanız
33.1.10'dan düşükse emülatörü komut satırından başlatmak için
-packet-streamer-endpoint default
parametresinden yararlanın.
Emülasyonlu hoparlörü keşfetmek ve ona bağlanmak için aşağıdaki komutu çalıştırın
komutuna dahil etmeniz gerekir:bumble
python3 examples/run_a2dp_sink.py examples/a2dp_sink1.json \
android-netsim stdout | ffplay -i
Ses çıkışı bilgisayarınızın hoparlörlerinden çalınır.
Çıkışı bir dosyaya da yönlendirebilirsiniz:
python3 examples/run_a2dp_sink.py examples/a2dp_sink1.json \
android-netsim output.sbc
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-07-27 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-07-27 UTC."],[],[],null,["# Test Bluetooth audio on emulators\n\nOn the Wear OS emulator, system images that run Wear OS 4 or higher include\nsupport for emulated Bluetooth. This support lets you test several use cases\nrelated to Bluetooth audio.\n\nPair with an emulated phone\n---------------------------\n\nUsing the emulator's Bluetooth support, you can pair with an emulated phone. To\ndo so, enable the setup wizard from the command line: \n\n -append-userspace-opt androidboot.setupwizard_mode=REQUIRED\n\nPlay audio through an emulated output device\n--------------------------------------------\n\nUsing the emulator's Bluetooth support, you can also play audio through an\nemulated Bluetooth output device. To test audio output switching in the\nemulator, connect to an emulated Bluetooth output device using the open source\n[Bumble project](https://www.github.com/google/bumble).\n\n### Prepare your environment\n\nTo prepare your development machine for using Bumble, complete the following\nsteps:\n\n1. Fetch the Bumble source code:\n\n ```\n git clone https://github.com/google/bumble\n ```\n2. Navigate to the `bumble` directory, then build and install\n Bumble modules:\n\n ```\n cd bumble && python3 -m pip install \".\"\n ```\n\n### Launch emulated Bluetooth speaker\n\nTo launch the emulated speaker, complete the following steps:\n\n1. Launch a version of the emulator that supports Wear OS 4 or higher.\n\n **Note:** If you're using an emulator version\n lower than 33.1.10, launch the emulator from the command line using the\n `-packet-streamer-endpoint default` parameter.\n2. To discover and connect to the emulated speaker, run the following\n command in the `bumble` directory:\n\n ```\n python3 examples/run_a2dp_sink.py examples/a2dp_sink1.json \\\n android-netsim stdout | ffplay -i\n ```\n\n The audio output is played through your computer's speakers.\n\n You can also redirect output to a file: \n\n ```\n python3 examples/run_a2dp_sink.py examples/a2dp_sink1.json \\\n android-netsim output.sbc\n ```"]]