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
Highlighted
Developer
Posts: 95
Registered: ‎03-22-2009
My Device: Torch 9800 & Bold 9700

http get

Hi there,

 

I want to send some data like the following to a php page:

http://www.website/index.php?msg=Hello

 

How do I call this without using a web browser on the Blackberry?

 

Thanks!

 

 

Developer
Posts: 4,764
Registered: ‎07-21-2008
My Device: Not Specified

Re: http get

You create an HTTP connection.

 

See the HTTPDemo source that ships with the JDE sample programs, and review this sticky thread:

 

http://supportforums.blackberry.com/rim/board/message?board.id=java_dev&thread.id=29103

 

Developer
Posts: 95
Registered: ‎03-22-2009
My Device: Torch 9800 & Bold 9700

Re: http get

[ Edited ]

Hi

 

Yea I used some of the code from that example:


 

try {
s = (StreamConnection)Connector.open("http://www.website.com/index.php?msg=999999999");
httpConn = (HttpConnection)s;
}

catch (IOException e) {
// TODO Auto-generated catch block
e.printStackTrace();
}

 

 However its not working.

When I go through the browser on the simulater it works fine!

 

Any thoughts?

Thanks

 

Message Edited by grahamb314 on 06-10-2009 02:11 PM
Developer
Posts: 4,764
Registered: ‎07-21-2008
My Device: Not Specified

Re: http get

Did you start MDS? This is required if you are doing an HTTP connection to simulates a BES network (i.e., no connection suffix).

 

You can go direct TCP on the simulator if you add ";deviceside=false" to your URL.

 

Did you review the sticky thread I linked above? All is explained.

 

Contributor
Posts: 28
Registered: ‎11-13-2012
My Device: none
My Carrier: 27768965251

Re: http get

Hi, how do I display the data of the php results?
Developer
Posts: 17,025
Registered: ‎07-29-2008
My Device: Z10 LE, Z30, Passport
My Carrier: O2 Germany

Re: http get


RexDoug wrote:
You can go direct TCP on the simulator if you add ";deviceside=false" to your URL.

direct would be ;deviceside=true.

In any case, it is better to use http://www.blackberry.com/developers/docs/7.1.0api/net/rim/device/api/io/transport/ConnectionFactory...

----------------------------------------------------------
feel free to press the like button on the right side to thank the user that helped you.
please mark posts as solved if you found a solution.
@SimonHain on twitter