Hello everyone.
I have coded a midlet which downloads a few images from http-server over GPRS and publish them on the screen.
Midlet works perfect on emulator (JBuilder + j2me).Code:HttpConnection c = null; DataInputStream is = null; try { //a.getPort(); c = (HttpConnection) Connector.open("http://www.whateversite.com/" + name); int status = c.getResponseCode(); if (status != 200) { throw new IOException("HTTP Response Code = " + status); } int len = (int) c.getLength(); String type = c.getType(); if (!type.equals("image/png") && !type.equals("image/jpeg")) { throw new IOException("Expecting image, received " + type); } if (len > 0) { is = c.openDataInputStream(); byte[] data = new byte[len]; //String map_name = null; is.readFully(data); ............ and so one
On nokia 6270 device, while Connector.open() is trying to connect to server, "G" doesnt show up at the top left corner (which must indicate that GPRS connection established).
So the question is: should I connect 6270-device manualy before starting the midlet? If yes, then how? I didnt find any connect-manager on it..
ps. useing the default nokia 6270 web-browser, GPRS internet works without any problems. Browser connects to GPRS automaticly when Im trying to open any web-site.
Thanks in advance.

Reply With Quote

