J2ME Bluetooth problem.
843849Apr 24 2004 — edited Apr 25 2004 This piece of code will not do what I want it to do when running the Nokias Developer Suit emulator (or rather the last few lines won't). I have a client that is connected to this server. The client starts an OutputStream and runs a out.write(/*some data*/). There after the client camly continues to do something else but the the server code here just stops at in.read().
Can someone please tell me what I am doing wrong? I'm pretty desperate for help...
try
{
local.setDiscoverable(DiscoveryAgent.GIAC);
server = (StreamConnectionNotifier)Connector.open("btspp://localhost:0000ab234f234eef1243a123a098a745");
conn = server.acceptAndOpen();
}
catch(BluetoothStateException e)
{
}
try
{
InputStream is = conn.openInputStream();
int ch;
byte b[] = new byte[100]
ch = is.read(b);
}
catch(IOException e)
{
}