public static boolean isBluetoothEnabled(){
  BluetoothAdapter mBluetoothAdapter=BluetoothAdapter.getDefaultAdapter();
  return (mBluetoothAdapter != null && mBluetoothAdapter.isEnabled());
}

public static boolean isBluetoothEnabled ( ) { BluetoothAdapter mBluetoothAdapter = BluetoothAdapter . getDefaultAdapter ( ) ; return ( mBluetoothAdapter != null && mBluetoothAdapter . isEnabled ( ) ) ; }
check if bluetooth connection is enabled
