Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Using Bluetooth in Android Emulator

If I wanted to implement an app for 2 Android devices so I can connect from one to the other via bluetooth, how can I do that via emulator?

HINT: I don't have an Android phone for simulating.

Thanks.

like image 290
Adly Avatar asked Mar 22 '12 11:03

Adly


2 Answers

There are few limitations for the Android Emulator. The functional limitations 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 device-attached headphones
  • No support for determining network 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

-Reference Link

like image 76
Padma Kumar Avatar answered Sep 28 '22 02:09

Padma Kumar


I've found the way to debug bt-enabled application on virtual android with real devices. That is not ADK emulator, and it has some flaws, but it definitely works.

Host computer works under Windows 7 64-bit with standard BT stack. Step by step:

  1. Install VMWare Player. It's free for non-commercial usage
  2. Create virtual machine. Set "Other linux 2.6" guest OS type.
  3. Choose reasonable amount of RAM. Remove SCSI disk and printer. Add IDE disk at least 1 GB, keep USB controller, ensure if bluetooth devices are shared with host computer.
  4. Download android installation from android-x86.org. I recommend Android 4.0 RC2 for EEE PC
  5. Point VM's CD to the ISO file.
  6. Start the VM and install android. Unfortunately, it's impossible to add google account there for now.
  7. Switch to android console(Alt-F1 inside virtual machine) and ask for IP address(use netcfg command, look at eth0 network interface), then switch back to GUI(Alt-F7)
  8. On host machine, run adb.exe connect your-vm-ip
  9. Enjoy!

Here is an illustrated tutorial in Russian

like image 27
elmot Avatar answered Sep 28 '22 03:09

elmot