06-10-2009 12:36 PM
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!
06-10-2009 12:44 PM
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/mess
06-10-2009 02:11 PM - edited 06-10-2009 02:11 PM
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
06-10-2009 04:01 PM
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.
11-13-2012 03:28 AM
11-13-2012 03:43 AM
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