Re: Trouble to send text with bluetooth

[email protected] Fri, 25 Jul 2008 07:05:36 PDT
Newsgroups gmane.comp.java.sun.kvm
Message-ID <7078453.182551216994769529.JavaMail.tomcat@sdcst12.sjc.collab.net>
You need to supply a HeadSet object to your ClientSession.connect() instead of "null".

     HeadSet headerSet = clientSession.createHeaderSet();
     clientSession.connect(headerSet);

Here is a link to a page that discusses this method of connection request and another issue that you might run into later.
https://developer.sonyericsson.com/message/75888 

Also is your code wrapped in a try/catch, as there are statements that can throw exceptions and these may be what are making your app appear to stop.  If you do have a try/catch, you might see if an exception is reported.   The other possibility is your app is blocking (stopped) waiting on the device.   However since it is null it never finds it and hangs.

I am also wondering why you are using this style of bluetooth connection, as opposed to the more common StreamConnectionNotifier strategy?    

Regards, 
-Shawn
[Message sent by forum member 'sfitzjava' (sfitzjava)]

http://forums.java.net/jive/thread.jspa?messageID=289360

===========================================================================
To unsubscribe, send email to [email protected] and include in the body
of the message "signoff KVM-INTEREST".  For general help, send email to
[email protected] and include in the body of the message "help".