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

Reply
New Developer
Posts: 26
Registered: ‎08-10-2009
My Device: Bold, Curve
Accepted Solution

How to specify "device=true/false" when URL has path and querystring

e.g. http://myserver.com/path/my.php?id=xxxxxx&name=xxxxxxxI've been reading a lot of examples about adding "device=true/false" or "interface=wifi" based in the current connection service. But all those examples assume that URL doesn{t have path or query string:

 

e.g. http://myserver.com;device=true

 

I have to access a server where the resources have path and I have to set parameters via QueryString

 

e.g. http://myserver.com/path/my.php?id=xxxxxx&name=xxxxxxx

 

I've been addding "device=true" at the end of the URL and at the end of the hostname

 

e.g. http://myserver.com/path/my.php?id=xxxxxx&name=xxxxxxx;device=true

e.g. http://myserver.com;device=true/path/my.php?id=xxxxxx&name=xxxxxxx

 

and none of those works. Is there any way to specify it when the URL has path and uses querystring

 

I'm working with JDE Plugin 4.5, Ecliipse 3.4, for Curve 8310 and Bold 9000

 

Thanks

 

-f

Franklin Garcia
Senior Software Java Developer
Schematic
Costa Rica
Developer
Posts: 19,612
Registered: ‎07-14-2008
My Device: Not Specified

Re: How to specify "device=true/false" when URL has path and querystring

[ Edited ]

You always add the connection string to the very end of the complete URL, regardless of what else the URL contains.

 

The connection string is stripped off by the Blackberry processing so your host won't be confused by it.  The connectin String is used by the BlackBerry to determine what connection path the BlackBerry will use for the connection.

 

BTW, it is ";deviceside=true/false", not "device", which might explain part of your problem.

 

I believe this KB article explains all the possible connection strings:

 

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...

 

For further information, I recommend the Required reading section of this Thread:

http://supportforums.blackberry.com/t5/Java-Development/Connecting-your-BlackBerry-http-and-socket-c...

 

New Developer
Posts: 26
Registered: ‎08-10-2009
My Device: Bold, Curve

Re: How to specify "device=true/false" when URL has path and querystring

Thanks for your response.

 

You are rigth, is deviceside :smileyhappy:. My problem I think is based on the requirement of my application to be able to connect to my web service whatever the connection the user has (3G, GPRS/EDGE, WiFi,etc) and then attach the right connection string.

 

Unfortunately , the simulator doesn't behave as the real device. Right now I'm able to read one of my services, but I'm not able to open a socket or pull an image. Sometimes I got an Tunnel Failed or just an IOException without any message.

 

I don't know why RIM didn't provide a component that could make all this work (since all mobile network / wifi) information is also in the phone, similar as the Iphone provides for connections :smileyfrustrated:, but anyways this is what we have.

 

Thanks again

Franklin Garcia
Senior Software Java Developer
Schematic
Costa Rica