Welcome!

Welcome to the official BlackBerry Support Community Forums.

This is your resource to discuss support topics with your peers, and learn from each other.

inside custom component

Java Development


Thank you for visiting the BlackBerry Support Community Forums.

BlackBerry will be closing the BlackBerry Support Community Forums Device Forums on April 1st (Developers, see below)

BlackBerry remains committed to providing excellent customer support to our customers. We are delighted to direct you to the CrackBerry Forums, a well-established and thorough support channel, for continued BlackBerry support. Please visit http://forums.crackberry.com or http://crackberry.com/ask. You can also continue to visit BlackBerry Support or the BlackBerry Knowledge Base for official support options available for your BlackBerry Smartphone.

"When we launched CrackBerry.com 10 years ago, we set out to make it a fun and useful destination where BlackBerry Smartphone owners could share their excitement and learn to unleash the full potential of their BlackBerry. A decade later, the CrackBerry community is as active and passionate as ever and I know our knowledgeable members and volunteers will be excited to welcome and assist more BlackBerry owners with their questions."

- Kevin Michaluk, Founder, CrackBerry.com

Developers, for more information about the BlackBerry Developer Community please review Join the Conversation on the BlackBerry Developer Community Forums found on Inside BlackBerry.


Reply
New Contributor
Posts: 2
Registered: ‎12-31-2012
My Device: Blackberry Bold 9700
My Carrier: Vodaphone

How do I connection to a Bluetooth handsfree device using JDE

I'm trying to write a very simple app that will check if my cars handsfree radio is in range and if it is connect to it. I can see the handsfree radio using DiscoveryAgent and can find the handsfree service. I can also get the connection URL which is "btspp://5453ED430AA1:1;authenticate=false;encrypt=false;master=false". I have tried to connect using "StreamConnection con =(StreamConnection)Connector.open(sURL);" in a seperate thread, which does not work. I have also tried using SocketConnection which also doesn't work. When I try "Connector.open(sURL)", the handsfree radio phone Icon flashes like it is trying to connect, but the connection doesn't hold. I thought this was going to be fair simple to achieve, but even after many hour's on google, I still can't work it out. Any advice on how to complete the connection using the connection string would be very greatfully received.
Highlighted
Developer
Posts: 4,764
Registered: ‎07-21-2008
My Device: Not Specified

Re: How do I connection to a Bluetooth handsfree device using JDE

It's actually a serial connection, You need to get the port data from the bluetooth info first.

 

Did you review this RIM Bluetooth sample?

 

http://supportforums.blackberry.com/t5/Java-Development/Bluetooth-Demonstration/ta-p/447662

New Contributor
Posts: 2
Registered: ‎12-31-2012
My Device: Blackberry Bold 9700
My Carrier: Vodaphone

Re: How do I connection to a Bluetooth handsfree device using JDE

Thanks for the quick reply. I started out thinking this was a serial connection, however when I call " BluetoothSerialPortInfo[] info = BluetoothSerialPort.getSerialPortInfo();" nothing is returned. The "info.length = 0", even though my handsfree radio is paired to my blackberry. Is there another way to get the serial connection info I need, or is there another way to connection. Basically I want to do the same thing that happen when I go to my bluetooth options, select my handsfree device, and select connect.