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 Developer
Posts: 23
Registered: ‎08-06-2008
My Device: Not Specified
Accepted Solution

GPSDemo

Hi, i testing that example with a socket server. In the variable  

private static String _hostName = "XXXXXXXXXX:XXXX"  I have write the server ip.

 

In  public synchronized void setHost(String host)

{

_url = "http://" + host; // + ";deviceside=false"; // Don't use direct TCP.

this.notify(); // Notify the thread method so that any pending data can be resent.

}

 

But don´t send the position to the server?

This example is usefull for socket server?

Thx.

 

BlackBerry Development Advisor
Posts: 15,889
Registered: ‎07-09-2008
My Device: BlackBerry PRIV
My Carrier: Bell

Re: GPSDemo

What happens when you try?  Do you receive an exception?  Are you testing in the BlackBerry Simulator or on a real device?  Are you running the server side portion of the sample?
Mark Sohm
BlackBerry Development Advisor

Please refrain from posting new questions in solved threads.
Problem solved? Click the Accept As Solution button.
Developer
Posts: 19,636
Registered: ‎07-14-2008
My Device: Not Specified

Re: GPSDemo

Just to add to Mark's reply, if you are wanting to start a socket connection rather than an http connection, your url should begin "socket:" rather than "http:".  For further information, you should review the Connector API documentation (javax.microedition.io.Connector).
New Developer
Posts: 23
Registered: ‎08-06-2008
My Device: Not Specified

Re: GPSDemo

I change by socket but error "tunnel error" appears.

thx.

Developer
Posts: 19,636
Registered: ‎07-14-2008
My Device: Not Specified

Re: GPSDemo

I normally associate tunnel errors with invalid APN information when using direct TCP, i.e. ";deviceside=false".  Can you tell us the complete URL you are now using?
New Developer
Posts: 23
Registered: ‎08-06-2008
My Device: Not Specified

Re: GPSDemo

Url I using is _url = "socket://" + host;     In the host i have the ip adress and a port. For example: 78.123.76.3:7896

Developer
Posts: 3,951
Registered: ‎07-15-2008
My Device: Not Specified

Re: GPSDemo

You need to use the "APN" and "tunnelauthusername" and "tunnelauthpassword" for few carriers.

 

Refer to "javax.microedition.io.connector"

 

Example: "78.123.76.3:7896;deviceside=true;apn=wap.cingular;TunnelAuthUsername=WAP@CINGULARGPRS.COM;TunnelAuthPassword=CINGULAR1"

 

Tnq.


Use Search. "Accept Solution" If the problem is resolved.
Highlighted
Developer
Posts: 19,636
Registered: ‎07-14-2008
My Device: Not Specified

Re: GPSDemo

So you do not have a ;deviceside= in your URl?  I suggest you review the following:

 

What Is - Different ways to make an HTTP or socket connection
Article Number: DB-00396

http://www.blackberry.com/knowledgecenterpublic/livelink.exe/fetch/2000/348583/800451/800563/What_Is...

 

I see while researching this that BBDeveloper has added a comment.  Further to that, you can specify the APN options in the BlackBerry Options.  You will find it here:

Options-->Advanced-->TCP

New Developer
Posts: 23
Registered: ‎08-06-2008
My Device: Not Specified

Re: GPSDemo

Thanks, I change deviceside=true and configure APN and working properly.

Thx.