Skip to main content

About Displaying Image from FileConnection..

3 replies [Last post]
achie3xis
Offline
Joined: 2008-08-26

Hi All..

I have a problem about displaying image from fileconnection.i test in SonyEricsson and Nokia S60 (N 6120c).,
In SonyEricsson my Image can show.,but in nokia it can't be show..

this is my snippet code :please check it.,maybe i was wrong..

fc1 = (FileConnection) Connector.open(imageName.elementAt(0).toString()); InputStream is = fc1.openInputStream();
Image image = Image.createImage(is);

Nb:imageName is a Vector...

Please Help me..

Thanks

Asri Dwitiya

Reply viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.
rlopes
Offline
Joined: 2004-09-22

Are you sure the paths are correct? can you give an example of the values you are using?

achie3xis
Offline
Joined: 2008-08-26

Yeah..I'm sure..because i'm using try catch.,if fc1 is false the statment maybe thrown to "Catch"..,and i have check line by line using system out println..

fc1 = (FileConnection) Connector.open(imageName.elementAt(0).toString());..
i use dialog.show to show (imageName.elementAt(0).toString()) and the result is
"file:///c:/Images/11112008.jpg"..

Thanks 4 u'r reply..

Regards

Asri Dwitiya

Shai Almog

Hi,
we use this all the time (opening from a file connection) on devices
as well including Sony Ericsson devices. I'm assuming you don't have
permissions set properly for your MIDlet.

> Yeah..I'm sure..because i'm using try catch.,if fc1 is false the
> statment maybe thrown to "Catch"..,and i have check line by line
> using system out println..
>
> fc1 = (FileConnection) Connector.open(imageName.elementAt
> (0).toString());..
> i use dialog.show to show (imageName.elementAt(0).toString()) and
> the result is
> "file:///c:/Images/11112008.jpg"..
>
> Thanks 4 u'r reply..
>
> Regards
>
> Asri Dwitiya
> [Message sent by forum member 'achie3xis' (achie3xis)]
>
> http://forums.java.net/jive/thread.jspa?messageID=316446
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@lwuit.dev.java.net
> For additional commands, e-mail: users-help@lwuit.dev.java.net
>

Shai Almog
http://lwuit.blogspot.com/

[att1.html]