I want to create an application based on bluetooth operation in android.I am using the following code
BluetoothAdapter adapter=BluetoothAdapter.getDefaultAd
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"