صدای بلوتوث را روی شبیه سازها تست کنید
با مجموعهها، منظم بمانید
ذخیره و طبقهبندی محتوا براساس اولویتهای شما.
در شبیه ساز Wear OS، تصاویر سیستمی که Wear OS 4 یا بالاتر را اجرا می کنند، شامل پشتیبانی از بلوتوث شبیه سازی شده هستند. این پشتیبانی به شما امکان می دهد چندین مورد استفاده مربوط به صدای بلوتوث را آزمایش کنید.
با تلفن شبیه سازی شده جفت شود
با استفاده از پشتیبانی بلوتوث شبیه ساز، می توانید با تلفن شبیه سازی شده جفت شوید. برای انجام این کار، جادوگر راه اندازی را از خط فرمان فعال کنید:
-append-userspace-opt androidboot.setupwizard_mode=REQUIRED
پخش صدا از طریق یک دستگاه خروجی شبیه سازی شده
با استفاده از پشتیبانی بلوتوث شبیه ساز، می توانید صدا را از طریق دستگاه خروجی بلوتوث شبیه سازی شده نیز پخش کنید. برای آزمایش سوئیچینگ خروجی صدا در شبیه ساز، با استفاده از پروژه منبع باز Bumble به دستگاه خروجی بلوتوث شبیه سازی شده متصل شوید.
محیط خود را آماده کنید
برای آماده سازی ماشین توسعه خود برای استفاده از Bumble، مراحل زیر را انجام دهید:
کد منبع Bumble را واکشی کنید:
git clone https://github.com/google/bumble
به دایرکتوری bumble
بروید، سپس ماژول های Bumble را بسازید و نصب کنید:
cd bumble && python3 -m pip install "."
بلندگوی بلوتوث شبیه سازی شده را راه اندازی کنید
برای راه اندازی بلندگوی شبیه سازی شده، مراحل زیر را انجام دهید:
نسخه ای از شبیه ساز را راه اندازی کنید که از Wear OS 4 یا بالاتر پشتیبانی می کند.
توجه: اگر از نسخه شبیه ساز کمتر از 33.1.10 استفاده می کنید، شبیه ساز را از خط فرمان با استفاده از پارامتر -packet-streamer-endpoint default
اجرا کنید.
برای کشف و اتصال به بلندگوی شبیه سازی شده، دستور زیر را در دایرکتوری bumble
اجرا کنید:
python3 examples/run_a2dp_sink.py examples/a2dp_sink1.json \
android-netsim stdout | ffplay -i
خروجی صدا از طریق بلندگوهای کامپیوتر شما پخش می شود.
همچنین می توانید خروجی را به یک فایل هدایت کنید:
python3 examples/run_a2dp_sink.py examples/a2dp_sink1.json \
android-netsim output.sbc
محتوا و نمونه کدها در این صفحه مشمول پروانههای توصیفشده در پروانه محتوا هستند. جاوا و OpenJDK علامتهای تجاری یا علامتهای تجاری ثبتشده Oracle و/یا وابستههای آن هستند.
تاریخ آخرین بهروزرسانی 2025-07-29 بهوقت ساعت هماهنگ جهانی.
[[["درک آسان","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-29 بهوقت ساعت هماهنگ جهانی."],[],[],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 ```"]]