plz help me my code is given below. and i am stuck at that point to search the services of a bluetooth device. i dont know y it is going fail to search the services. here is my code and after this u can see the console output . . . String param =""; if(encrypt) param = "encrypt=true;"; else if(authorize) param="authorize=true;"; else if(authenticate) param="authenticate=true;"; param += "name=BlueTooth Bench"; if(master) param +=";master=true"; connectionURL = "btspp://localhost:66ca80886d1f11d88526000bdb544cb1;" + param; System.out.println("going into Stream connecton notifyer....."+ connectionURL); try { System.out.println("before Stream connecton notifyer....."); server = (StreamConnectionNotifier) Connector.open(connectionURL); System.out.println("after Stream connecton notifyer....."); } catch (IOException e1) { System.out.println("Stream IOexception....."); return false; }
Console out put start Application Command Action start command button is clicked Create Service method Device Bluetooth Address: 0000000DECAF going into Stream connecton notifyer.....btspp://localhost:66ca80886d1f11d88526000bdb544cb1;name=BlueTooth Bench before Stream connecton notifyer..... Warning: To avoid potential deadlock, operations that may block, such as networking, should be performed in a different thread than the commandAction() handler.
|