tags:

views:

863

answers:

2

Hi

I want to create an application based on bluetooth operation in android.I am using the following code

 BluetoothAdapter adapter=BluetoothAdapter.getDefaultAdapter();

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.

+3  A: 

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"

MrSnowflake
A: 

ya i agree.this is right that right now emulator dos not support bletooth.

To compile Android with Bluetooth support enabled, add the following line to BoardConfig.mk.

BOARD_HAVE_BLUETOOTH := true

vivek satasia