Cannot run (in Eclipse) Bluetooth Chat sample app from Android website
When I run the app in Eclipse, Android emulator starts but says
"Bluetooth is not available".
Also need help with running/installing an app on real phon开发者_JAVA技巧e. I connected my HTC Desire (Android 2.2), enabled USB debugging and run the app from Eclipse. Emulator starts as usual instead of the app running on my phone.
It's not possible to run bluetooth aap on emulator, as there is no support for bluetooth on emulator.
Look at this 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
Bluetooth is not supported on the emulator. See here about the Emulator Limitations: http://developer.android.com/guide/developing/tools/emulator.html#limitations
For debugging on the actual device, you'll need to make sure the device is recognized by adb. Try 'adb devices' to see if your phone is listed. If the emulator is running you should see that as something like 'emulator-5554', but your real device will be a longer string of letters and digits. If it's not showing up, this is why eclipse will start the emulator.
if you want to run app in your real phone you must install pc suit for your phone and then connect it to pc in pc_suit mode and make shure that name of your phone is show in device name in eclips and then run app
精彩评论