Cannot get StreamConnectionNotifier !

Hi,

I have a basic, yet major problem. I am creating a client-server app which will send some data from one to the other. The client can detect the server, but cannot find a particular service. I've narrowed it down to a particular line of code on server side:

private UUID myService =new UUID("1101",true);private String url ="btspp://localhost:" + myService.toString() +";name=xSPPServer";StreamConnectionNotifier notifier = (StreamConnectionNotifier)Connector.open(url);

The service record is never created! The code above was put in a try/catch block. The error received on Sun WTK is: "Java.lang.SecurityException: Application not authorized to access restricted API"

On my SE W810i, I do not get any errors, but my app stalls at open(url). On my Moto Razr I get "java.lang.SecurityException: javax.microedition.io.Connector.bluetooth.erver was denied".

I have included the bluetooth server permission in my file. I do not understand why I cannot get a notifier. I have read all related docs and have not found the solution. I have also tried all variations of authenticate/authorize/encrypt/master values in the url. By the way, the above line of code runs in a separate thread, but is recommended anyway.

I have tried dozens of sample server/client code out there and have not been able to connect 2 phones, i guess for the same reason. Can anyone please help?

[1624 byte] By [don1raja] at [2007-11-27 1:55:53]
# 1
this is obviously a permission problem, but i do not understand what i am doing wrong. i have added the permission to the jad file. does anyone have any idea what is going on here? thanks
don1raja at 2007-7-12 1:29:32 > top of Java-index,Java Mobility Forums,Java ME Technologies...