I my opinion, if A2DP doesn't work properly, we'd better move to lower layer, and we can create a basic stream which can be used for sending any form of date. I succeed in sending byte stream via Bluetooth between J2ME devices.
If install an app in both devices is acceptable, I've sample codes to create a Bluetooth server and a client to communicate with each other via socket, once the socket is established, you can send you audio stream :)
here are some core codes:
1) server device:
// you can generate your own UUID and use it as an port to eatablish a socket
private static final UUID MY_UUID = UUID.fromString("20687DAD-B023-F19E-2F60-A135554CC3FD")
BluetoothServerSocket serverSocket = mBluetoothAdapter.listenUsingRfcommWithServiceRecord(NAME_INSECURE, MY_UUID);
now you have the serverSocket, just use it as an ordinary ServerSocket:
BluetoothSocket socket = serverSocket.accept();
and then you can get InputStream
and OutputStream
from this BluetoothSocket
and send audio stream just like HttpConnection
2) client device:
assume you already got the BluetoothDevice
// you should implement the method getBlutoothDevice
BluetoothDevice device = getBluetoothDevice();
BluetoothSocket socket = device.createRfcommSocketToServiceRecord(MY_UUID_SECURE);