Hi all,
Im having trouble opening an HTTP connection on a real device.
The code does work on the simulator...
I've tried both ";deviceside=true" and ";deviceside=false".
Im using Wi-Fi so I guess I dont need APN (I dont even have a SIM card on that device).
I have 2 different exceptions,
when using deviceside=false - the exception I get is "java.io.IOException: Invalid url parameter."
when using the deviceside=true - I get "java.io.IOException: Tunnel failed", which is the same exception I get without adding the deviceside parameter at all.
Here is the code if it helps...:
Code:
InputStream x = null;
String bla = null;
String mybla = null;
String connectionString = "http dots //www dot google dot com/;deviceside=true";
System.out.println("Enteting Program");
try {
System.out.println("Connection String is: " + connectionString);
x = Connector.openInputStream(connectionString);
} catch (IOException e) {
// TODO Auto-generated catch block
e.printStackTrace();
System.out.println("Failed Opening Stream for GOOGLE");
bla = e.toString();
mybla = e.getMessage();
System.out.println("bla: " + bla + " my bla: " + mybla);
}
connectionString = "http dots //www dot google dot com/;deviceside=false";
try {
System.out.println("Connection String is: " + connectionString);
x = Connector.openInputStream(connectionString);
} catch (IOException e) {
// TODO Auto-generated catch block
e.printStackTrace();
System.out.println("Failed Opening Stream for GOOGLE");
bla = e.toString();
mybla = e.getMessage();
System.out.println("bla: " + bla + " my bla: " + mybla);
}
(sorry about the dot and dots in the code, it wouldnt let me post it otherwise)
Any help would be very much appriciated since Im really stuck...
I gave this application every security allow possible... (I think...).
BTW, Im using BlackBerry 8320 Curve (with OS version 4.5.0)
Thanks!