I am developing an application. The application calls a website via HTTP passing some parameters and waits for the response.
I have tested it on some of the newer devices and it works fine but now I am testing it on a 8707 (Java 22.214.171.1247). When I run the program for the first time it says "This program is attempting a HTTP request" I accept this but then it immediated throws the following exception:
javax.microedition.io.ConnectionNotFoundException: Protocol not found: null
Based on that error it appears that it is saying that the device does not support HTTP? But I can browse the internet fine from the device.
I have installed the application OTA from my website.
My gut feeling it is a device setting? Someone mentioned that it is possible to choose between using the carrier internet proxy or BIS? But I do not know how to change this?
I am on Optus in Australia
I have tried the following things to fix the problem but with no success
*) try and write a simple program which makes a HTTP connection to Google
- same exception is thrown
*) changed from 3G to 2G on the Options>Network page
*) changed the setting for the internet browser to access WML or HTML (although I assume these have no effect on other applications?)
*) changed the security options on my application to "Allow" everything.
I am at a loss. Below is the following code fragment
s = (StreamConnection)Connector.open(getUrl());
HttpConnection httpConn = (HttpConnection)s;
int status = httpConn.getResponseCode();
if (status == HttpConnection.HTTP_OK)
InputStream input = s.openInputStream();
The exception is thrown on the Connector.open.
It obviously works fine in the Emulator
Any help would be greatly appreciated