25 Oct 2010, 15:02
Generic-user-small

Madhu Nandan (1 post)

Hi,

Probably this is a simple question but I am new to Java and Android. So please help me.

I downloaded the Bluetooth Chat sample code from android site. When I try to run it on the emulator, emulator says “Bluetooth not available”. It would be great if someone can show me how to run this app.

Also, I was able to compile and run the Sudoku example on the emulator but not on my phone (HTC Desire with Android 2.2). I enabled USB Debugging, closed emulator and ran Sudoku from Eclipse. Instead of running on my phone, emulator gets opened again.

Appreciate your time.

Madhu

01 Nov 2010, 01:57
Burnette_ed_pragsmall

Ed Burnette (1316 posts)

The emulator doesn’t have Bluetooth so you have to run that on a real phone.

The problem with the emulator starting up could be a couple of different things. Try running the command “adb devices” from a command (shell) window. If your phone does not show up in that list then it’s probably a problem with your USB driver. It’s tough to get that set up right on Windows.

I was just working on this part of the book for the next printing (P3). Here’s what I wrote:

“Alternatively, you can switch between the emulator and the phone by editing your run configuration (Run > Run Configurations…), selecting the Target tab, and changing the Target selection mode to suit your preferences. Setting it to Manual will cause Eclipse to prompt you to select the device each time you run the program. If your phone does not appear in the list, it usually indicates a problem with your USB driver or with your target and minimum SDK levels. You may need to make a change to your AndroidManifest.xml file if your phone does not have the latest version of Android (see section 13.2).”

19 Nov 2012, 10:26
Generic-user-small

florin cosmin onciu (1 post)

Hey, I am using a Galaxy Tab 2 Tablet with android 3.2. I didn’t figured out yet how to test the sample Bluetooth chat. I guess there must be more than one device running the sample code in order to test the chat feature. But the problem is that the App crashes at the first run. Any hints will be appreciated. regards, Florin.

14 Apr 2013, 03:07
Burnette_ed_pragsmall

Ed Burnette (1316 posts)

Sorry, the Bluetooth chat example is not one of mine and I’m not familiar with it. Try searching or asking over at stackoverflow.com for assistance.

  You must be logged in to comment