Note that there are some explanatory texts on larger screens.

plurals
  1. POBlackBerry embedded browser: image display using HTML
    primarykey
    data
    text
    <p>I'm developing a BlackBerry app which uses an embedded browser to display html content.<br> Testing application on Torch I've realized that only project embedded images are displayed by browser, while I've got problems accessing image resource files stored on removable SD card or internal file system.<br> The same application running on Curve displays correctly all the images.<br> Here is a fragment of code:</p> <pre><code> browser = new BrowserField(); Strimg img_1 = "file:///store/home/user/yellow.png"; Strimg img_2 = "file:///SDCard/green.png"; Strimg img_3 = "file:///local/images/red.png"; String imgTag_1 = "&lt;img src=\"" + img_1 + "\"&gt;"; // Stored on file system - Not displayed by Torch String imgTag_2 = "&lt;img src=\"" + img_2 + "\"&gt;"; // Stored on SDCard - Not displayed by Torch String imgTag_3 = "&lt;img src=\"" + img_3 + "\"&gt;"; // Embedded image String browserContent = "&lt;html&gt;" + imgTag_1 + imgTag_2 + imgTag_3 + "&lt;/html&gt;"; byte[] contentBytes; try { contentBytes = browserContent.getBytes("UTF-8"); browser.displayContent(contentBytes, "text/html; charset=UTF-8", "http://mysite.com"); } catch (UnsupportedEncodingException e) { e.printStackTrace(); browser.displayContent(browserContent, "http://mysite.com"); } aVerticalManager.add(browser); </code></pre> <p><br>I'm using JRE 5 both for Curve and Torch. Using FileConnector to accessing file works fine. </p> <p>Any suggestions on how to display images both on Torch and Curve? Thanks<br><br></p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload