10-25-2009 07:29 AM
I have an application with some BitmapFields and some LabelFields and I would need to display an image (in png) from a website (www.mypage.com/images/logo.png) in one of the BitmapFields in my application.
How do I do that?
When I add an image from the resource, I add it like that:
add(new BitmapField(Bitmap.getBitmapResource( "image.png" ),BitmapField.FIELD_LEFT));
Can someone help me on how to add it from the internet/url?
10-25-2009 08:27 AM
you would probably have to get it by yourself:
HttpConnection conn = (HttpConnection)Connector.open(http://www.mypage.com/images/logo.png);
the call openInputStream() to get the data, read it into a buffer and then create your bitmap with