| Reply | « Previous Thread | Next Thread » |
|
I am trying to get an image through HTTP Connection to my mobile phone. I used emulator from Sun and it is working. When i tried on mobile phone(3650) it will not show anything.
I tried also on Nokia's Developer Suite for J2ME. At the point of connection i have the following exception: Exception: java/lang/ClassNotFoundException at com.sun.midp.io.InternalConnector.openPrim(+159) at com.sun.midp.io.InternalConnector.openPrim(+159) at com.sun.midp.io.j2me.http.Protocol.connect(+55) at com.sun.midp.io.j2me.http.Protocol.openInputStream(+64) at com.sun.midp.io.j2me.http.Protocol.openDataInputStream(+28) .... Thank you |
| cristi_armeana |
| View Public Profile |
| Find all posts by cristi_armeana |
|
show your code plz
|
|
private Image setImage()
{ String url = "http://myAddress/img.png"; Image m_Image = null; ContentConnection connection = null; DataInputStream iStrm = null; try { connection = (ContentConnection) Connector.open(url); iStrm = connection.openDataInputStream(); byte imageData[]; int length = (int) connection.getLength(); if (length != -1) { imageData = new byte[length]; iStrm.readFully(imageData); } else { ByteArrayOutputStream bStrm = new ByteArrayOutputStream(); int ch; while ((ch = iStrm.read()) != -1) { bStrm.write(ch); } imageData = bStrm.toByteArray(); bStrm.close(); } m_Image = Image.createImage(imageData, 0, imageData.length); } catch(Exception e) { ........... } ........................ |
| cristi_armeana |
| View Public Profile |
| Find all posts by cristi_armeana |
|
Did you solve this issue? If so,how? We have the same problem.
Thank you |
|
Still searching for the solution. It seems that getLength does not return the correct length. I will try on other phones and maybe i will update the software on 3650.
|
| cristi_armeana |
| View Public Profile |
| Find all posts by cristi_armeana |
|
I have exactly the same problem
|
|
Solution: The problem was due to a needed update of the mobile firmware.
Last edited by cristi_armeana : 2003-05-13 at 21:29.
|
| cristi_armeana |
| View Public Profile |
| Find all posts by cristi_armeana |
|
How to you update software on 3650? How do you find-out what version you have installed?
|
|
Join Date: Mar 2003
Posts: 21
Location: Maastricht, The Netherlands
Offline
Registered User
|
|
To find out what your software version is on a Nokia just 'call' *#0000#
And software upgrades are available at a Nokia servicepoint. |
| Reply | « Previous Thread | Next Thread » |
| Thread Tools | Search this Thread |
|---|---|