In my application written in J2ME, i am making an HTTP connection and pointing the URL to an Image. I am Getting the content of the image object and also the created and image is also displayed on the canvas on the EMULATOR, but when i m trying the same code on Device, I am getting the contents of the image but the image in not displayed on the screen..........
Can anybody tell me what seems to be th problem....... is it wioth code or device.
The device i am using is NOKIA 3650.
first of all let me clear you that same code is working fine on the emulator. that's y i m sure that the image data is coming properly.
and one more thing is there that, when i m showing a image and some text with it (HTML).... it gives a blank space whr the image is located (this is the second thing that shows tht image attributes are correct).
My guess is that you're not getting what you think you're getting. Could the image attributes for height and width could come from an img tag? Or is a space for the image shown simply because the app knows an image should go there (because of the presence of an img tag, for example)? The code is the same on both the device and the emulator; the emulator and the device are not identical, so that's one possible source of problem. But are you retrieving the image via the same route? Several people (me included) report experiencing problems with HTTP transactions through WAP gateways... especially changes to header fields and disappearing content.
Of course, if what you're retrieving isn't an image, then createImage() should be throwing an IllegalArgumentException...