4

In my application i am using bluetooth functionality,But in that the bluetooth adapter is returning null means there is no bluetooth option in that emulator(using version 2.1).Anybody please help me is it possible to use bluetooth in emulator.If not then how can i check my application.

subbu
  • 146
  • 2
  • 8
  • AFAIK, Bluetooth isn't supported in emulators. You can either use Virtual Box (which I think, might support Bluetooth) or a real device which will certainly support Bluetooth. – Ghost May 29 '12 at 06:55
  • thanks Ghost.But in my application i am facing some problem,then how can i fix it by using device. – subbu May 29 '12 at 06:58
  • You basically use devices for testing purposes. Check how your app runs on the device. If it crashes, it's bound to give you logcat. Based on that logcat, you can take necessary relevant action. – Ghost May 29 '12 at 07:00
  • 2
    Take a look at [this](http://stackoverflow.com/questions/2175076/how-to-use-bluetooth-in-android-emulator), there is a section saying **Bluetooth doesn't work on my device. How should I debug?** – Imran Rana May 29 '12 at 07:02
  • In the device how can i get logcat. – subbu May 29 '12 at 07:02
  • You can do it using **USB Debugging** just google it you will find solution . [Here](http://forum.samdroid.net/f38/tutorial-how-get-logcat-example-check-battery-drain-2543/) is an sample. [This so post](http://stackoverflow.com/questions/3707880/using-adb-logcat-with-a-real-phone-and-not-the-emulator) should help. – Imran Rana May 29 '12 at 07:06
  • You enable USB Debugging on your device as well as in the manifest of your app. Then when you connect it, you should be able to debug your apps. You should read more. Do some research.. @ImranRana has posted a couple of nice links. Go thru' them. Once you've a query regarding something else, you can come back here and post/re-post it.. – Ghost May 29 '12 at 07:13

2 Answers2

4

There are some limitations within avd, after-all this is not a real device, only a simulation of the real android device.

As per Android Developer Guide following are the limitation of the avd:

Emulator Limitations

The functional 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 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
orchidrudra
  • 1,172
  • 1
  • 12
  • 30
  • Ya orchidrudra.I find it.What is the solution.How can i check my application??if it using bluetooth. – subbu May 29 '12 at 07:08
  • 1
    Best way to test bluetooth apps is to run on a real device, but if you dont have any you can give [this](https://github.com/cheng81/Android-Bluetooth-Simulator) a try. This is an bluetooth simulator. – orchidrudra May 29 '12 at 07:18
0

The limitations documentation appears outdated. See http://wiki.qemu.org/download/qemu-doc.html. The -bt option was implemented in 2008 http://copilotco.com/mail-archives/qemu.2008/msg08744.html.

How does one enable bluetooth in the emulator since -bt is available? The target/board/emulator/BoardConfig.mk having BOARD_HAVE_BLUETOOTH := true does not enable bluetooth in and of itself.

Bob Gilmore
  • 12,608
  • 13
  • 46
  • 53