Hi...
my code always fail when it reached
it gives an error: java.io.IOExcep tion: Can't create Service [General fail]
I don't know how to make a service in a case like this when I'm setting my device in setDiscoverable ...
I would appreciate some explanations and sample.
my code always fail when it reached
Code:
server = (StreamConnectionNotifier)Connector.open(url.toString ());
Code:
System.out.println("Setting device..");
local = LocalDevice.getLocalDevice();
if (!local.setDiscoverable (DiscoveryAgent.GIAC)) {
throw new IOException("Can't set discoverable mode...");
}
StringBuffer url = new StringBuffer ("btspp://");
url.append ("localhost").append (':');
url.append (uuid.toString ());
url.append (";name=code");
url.append (";authorize=false");
System.out.println("Opening URL");
try{
server = (StreamConnectionNotifier)Connector.open(url.toString ());
}catch(Exception e){
I would appreciate some explanations and sample.