Android emulator with bluetooth

How to use Bluetooth in Android emulator?

the adapter is returning null value, which means the android emulator is not having bluetooth capability. i am using android 2.1 the latest version of android.Anybody knows how to use the bluetooth from android emulator, please help me.

8 Answers 8

You can’t. The emulator does not support Bluetooth, as mentioned in the SDK’s docs and on several other places.

And you already discovered this yourself: «the adapter is returning null value, which means the android emulator is not having bluetooth capability»

You can install the image from http://www.android-x86.org/ into a virtual machine (e.g. VMWare), find out it’s IP address, connect manually using

And then launch your project from Eclipse by setting a «Manual» deployment target in your Debug/Run configuration. Bluetooth works in this Virtual Machine at least on my Macbook and it’s reported to work with a couple of other bluetooth chipsets.

If you have a USB dongle and ensure that it’s passed through and connected to the virtual machine, I’d assume it works, yes.

It’s not possible to run bluetooth aap on emulator.as there is no support for bluetooth on emulator. look at this http://developer.android.com/guide/developing/devices/emulator.html Emulator Limitations

In this release, the limitations of the emulator include:

  • No support for placing or receiving actual phone calls. You can simulate phone calls (placed and received) through the emulator console, however.
  • No support for USB connections
  • No support for camera/video capture (input).
  • No support for device-attached headphones
  • No support for determining connected state
  • No support for determining battery charge level and AC charging state
  • No support for determining SD card insert/eject
  • No support for Bluetooth

Q. Bluetooth doesn’t work on my device. How should I debug?

A. First step — read the logs ( adb logcat )! In particular look for ERROR or WARNING level messages regarding Bluetooth.

Andoird uses Bluez, which comes with some very useful debugging tools. Here are some examples, in the rough order I use to debug BT.

hciconfig -a # print BT chipset address and features. Useful to # check if you can communicate with your BT chipset. hcidump -XVt # print live HCI UART traffic. hcitool scan # scan for local devices. Useful to check if RX/TX works. l2ping ADDRESS # ping another BT device. Useful to check if RX/TX works. sdptool records ADDRESS # request the SDP records of another BT device. 

Источник

Использование Bluetooth в эмуляторе Android

Если бы я хотел реализовать приложение для двух Android-устройств, поэтому я могу подключиться от одного к другому через Bluetooth, как я могу это сделать с помощью эмулятора? СОВЕТ. У меня нет телефона Android для моделирования. Спасибо.

Читайте также:  Какие блютуз наушники лучше всего

5 ответов

  • Нет поддержки для размещения или получения фактических телефонных звонков. Однако вы можете имитировать телефонные звонки (помещенные и полученные) через консоль эмулятора.
  • Поддержка USB-соединений не поддерживается
  • Отсутствует поддержка подключенных к устройству наушников.
  • Нет поддержки для определения состояния, подключенного к сети.
  • Нет поддержки для определения уровня заряда аккумулятора и состояния зарядки переменного тока.
  • Нет поддержки для определения вставки/извлечения SD-карты.
  • Поддержка Bluetooth

@SumanRoy IT не поддерживает внешний Bluetooth. В настоящее время AVD поддерживает только аппаратную клавиатуру, а для передней и задней камеры в эмуляторе вы можете использовать веб-камеру.

Я нашел способ отладить приложение с поддержкой bt на виртуальном Android с помощью реальных устройств. Это не эмулятор ADK, и у него есть некоторые недостатки, но он определенно работает.

Хост-компьютер работает под 64-разрядной версией Windows 7 со стандартным стеком BT. Шаг за шагом:

  • Установите VMWare Player. Он бесплатный для некоммерческого использования.
  • Создайте виртуальную машину. Установите гостевой тип «Other linux 2.6».
  • Выберите разумный объем оперативной памяти. Удалите диск SCSI и принтер. Добавьте диск IDE не менее 1 ГБ, держите USB-контроллер, убедитесь, что устройства Bluetooth подключены к главному компьютеру.
  • Загрузите установку Android с android-x86.org. Я рекомендую Android 4.0 RC2 для ПК EEE.
  • Отметьте VM CD в файле ISO.
  • Запустите виртуальную машину и установите андроид. К сожалению, сейчас невозможно добавить учетную запись google.
  • Перейдите на консоль Android (Alt-F1 внутри виртуальной машины) и попросите IP-адрес (используйте команду netcfg, посмотрите на сетевой интерфейс eth0), затем вернитесь к графическому интерфейсу (Alt-F7)
  • На хост-машине запустите adb.exe connect your-vm-ip
  • Наслаждайтесь!

Источник

Нужен аналог bluestacks, но с поддержкой bluetooth

Т.е. нужен запуск андроид-приложения на windows (блюстэк это прекрасно делает, но он не работает с блютузом, надо подключить устройство к андроиду на ВМ).

Поставки лицензионного программного обеспечения (пишите в «личку»). www.belrus.info

Remember, never say you can’t do something in InDesign, it’s always just a question of finding the right workaround to get the job done. ©David Blatner

George

I wish I was a monster you think I am

upd — нашёл кое-что как ставить через ВМ Vmware — но опять-таки, там нет Google Play — он тоже нужен для установки приложения, которое юзает устройство bluetooth

@_MBK_
Ты там что-то для себя ставил. Это что-то умеет с блутузом работать и качать приложения из гуглплей?

Поставки лицензионного программного обеспечения (пишите в «личку»). www.belrus.info

Remember, never say you can’t do something in InDesign, it’s always just a question of finding the right workaround to get the job done. ©David Blatner

_MBK_

Пикирующий бомбардировщик

Эмулятор что ли? С блютусом стопроцентно не может, а с гугльплэя не пробовал
Ты что, он даже анимацию не воспроизводит и тормозит как сволочь — это ж чисто отладочная

George

I wish I was a monster you think I am

Блюстек может качать и юзать приложения, но блютуз не пашет, youwave и ещё пара его конкурентов тоже.

Поставки лицензионного программного обеспечения (пишите в «личку»). www.belrus.info

Читайте также:  Asus k53s драйвер блютуз windows 10

Remember, never say you can’t do something in InDesign, it’s always just a question of finding the right workaround to get the job done. ©David Blatner

idreamer

George

I wish I was a monster you think I am

Поставки лицензионного программного обеспечения (пишите в «личку»). www.belrus.info

Remember, never say you can’t do something in InDesign, it’s always just a question of finding the right workaround to get the job done. ©David Blatner

JAW

@GeorgeS,
Remix OS?
Remix OS — The Future of Android PC is Here
Remix OS x86 — 4PDA
GAPPS вроде есть.
Вроде и на виртуалку ставили, но вопрос, пойдёт ли блютуч через виртуалку?

Снобизмпретензия на высокую интеллектуальность, изысканный вкус или авторитетность в какой-то области, и при этом надменное отношение к тем, кто якобы лишён этих достоинств.

suntory

Administrator

Пойдет, в VMware внизу иконку блютуса нажать и Connect to host.

Snap1.jpg

~RA~

~RA~

George

I wish I was a monster you think I am

Поставки лицензионного программного обеспечения (пишите в «личку»). www.belrus.info

Remember, never say you can’t do something in InDesign, it’s always just a question of finding the right workaround to get the job done. ©David Blatner

George

I wish I was a monster you think I am

Странные вещи бывают. Меня тут неизвестный человек в телеграме нашёл и подсказал (уже когда не надо, пять лет прошло, уже давно с андроидами куча ус-в у меня).

В общем, от незнакомого мне Сергея лайфхак —

Quit BlueStacks and then open Steam and add BlueStacks to library and start BlueStacks from Steam library. Your Bluetooth Controller will be working with BlueStacks!

Поставки лицензионного программного обеспечения (пишите в «личку»). www.belrus.info

Remember, never say you can’t do something in InDesign, it’s always just a question of finding the right workaround to get the job done. ©David Blatner

JAW

Я пользовался каким то образом одного из Android для компьютера на VmWare.
На Virtual Box USB не проталкиваются, по крайней мере тогда.

Эмуляторы типа блюстека и не проталкивали порт и были ущербней.
Вот какую именно систему, не помню.

Снобизмпретензия на высокую интеллектуальность, изысканный вкус или авторитетность в какой-то области, и при этом надменное отношение к тем, кто якобы лишён этих достоинств.

JAW

Снобизмпретензия на высокую интеллектуальность, изысканный вкус или авторитетность в какой-то области, и при этом надменное отношение к тем, кто якобы лишён этих достоинств.

George

I wish I was a monster you think I am

Поставки лицензионного программного обеспечения (пишите в «личку»). www.belrus.info

Remember, never say you can’t do something in InDesign, it’s always just a question of finding the right workaround to get the job done. ©David Blatner

Дмитри

Участник

Странные вещи бывают. Меня тут неизвестный человек в телеграме нашёл и подсказал (уже когда не надо, пять лет прошло, уже давно с андроидами куча ус-в у меня).

В общем, от незнакомого мне Сергея лайфхак —

Quit BlueStacks and then open Steam and add BlueStacks to library and start BlueStacks from Steam library. Your Bluetooth Controller will be working with BlueStacks!

Читайте также:  Автоматически включается блютуз самсунг

Не работает вариант — через стим не запускается. А эмуляторы как не видили блютуз, так и не видят. Детям весь новый год испорчен — принес дед мороз Леговские наборы, которые по блютузу программируются, получается нужно приложения только на планшет ставить — которого нет.

Источник

How to use android emulator for testing bluetooth application?

I am developing an application which will send a request to a bluetooth printer for printing. The code is working fine for real devices, but I want to run it on the Android Emulator. How can I use the emulator for bluetooth testing?

You can not use emulator for bluetooth. And it works on device then why do you want to run it on emulator ?

5 Answers 5

You can’t. The emulator does not support Bluetooth, as mentioned in the SDK’s docs and several other places. Android emulator does not have bluetooth capabilities«.

You can only use real devices.

Emulator Limitations

The functional limitations of the emulator include:

  • No support for placing or receiving actual phone calls. However, You can simulate phone calls (placed and received) through the emulator console
  • No support for USB
  • No support for device-attached headphones
  • No support for determining SD card insert/eject
  • No support for WiFi, Bluetooth, NFC

Download Androidx86 from this This is an iso file, so you’d
need something like VMWare or VirtualBox to run it When creating the virtual machine, you need to set the type of guest OS as Linux instead of Other.

After creating the virtual machine set the network adapter to ‘Bridged’. · Start the VM and select ‘Live CD VESA’ at boot.

Now you need to find out the IP of this VM. Go to terminal in VM (use Alt+F1 & Alt+F7 to toggle) and use the netcfg command to find this.

Now you need open a command prompt and go to your android install folder (on host). This is usually C:\Program Files\Android\android-sdk\platform-tools>.

Type adb connect IP_ADDRESS. There done! Now you need to add Bluetooth. Plug in your USB Bluetooth dongle/Bluetooth device.

In VirtualBox screen, go to Devices>USB devices. Select your dongle.

Done! now your Android VM has Bluetooth. Try powering on Bluetooth and discovering/paring with other devices.

Now all that remains is to go to Eclipse and run your program. The Android AVD manager should show the VM as a device on the list.

Alternatively, Under settings of the virtual machine, Goto serialports -> Port 1 check Enable serial port select a port number then select port mode as disconnected click ok. now, start virtual machine. Under Devices -> USB Devices -> you can find your laptop bluetooth listed. You can simply check the option and start testing the android bluetooth application .

Источник

Оцените статью
Adblock
detector