Welcome!

Welcome to the official BlackBerry Support Community Forums.

This is your resource to discuss support topics with your peers, and learn from each other.

inside custom component

Java Development

Reply
New Contributor
Posts: 3
Registered: ‎03-29-2010
My Device: none
My Carrier: none

Re: using native image viewer

As a side note, you can invoke the native browser without having to first save the image to the blackberry.

try
{
    String path = "data:" + mimeType + ";base64,";                            
    ByteArrayOutputStream output = new ByteArrayOutputStream();
    Base64OutputStream boutput = new Base64OutputStream(output);
    output.write(path.getBytes());
    boutput.write(data);
    boutput.flush();
    boutput.close();
    output.flush();
    output.close();
    BrowserSession bSession = Browser.getDefaultSession();
    bSession.displayPage(output.toString());
} catch (Exception e)
{

}

Keep in mind that mimeType will have to be set to the mimeType of the image you want to open.

www.Lionbridge.com

http://www.lionbridge.com
Highlighted
Developer
Posts: 246
Registered: ‎12-13-2010
My Device: Not Specified

Re: using native image viewer

AWESOME ty! Hopefully someone finds this useful