Thank you for visiting the BlackBerry Support Community Forums.
BlackBerry will be closing the BlackBerry Support Community Forums Device Forums on April 1st (Developers, see below)
BlackBerry remains committed to providing excellent customer support to our customers. We are delighted to direct you to the CrackBerry Forums, a well-established and thorough support channel, for continued BlackBerry support. Please visit http://forums.crackberry.com or http://crackberry.com/ask. You can also continue to visit BlackBerry Support or the BlackBerry Knowledge Base for official support options available for your BlackBerry Smartphone.
"When we launched CrackBerry.com 10 years ago, we set out to make it a fun and useful destination where BlackBerry Smartphone owners could share their excitement and learn to unleash the full potential of their BlackBerry. A decade later, the CrackBerry community is as active and passionate as ever and I know our knowledgeable members and volunteers will be excited to welcome and assist more BlackBerry owners with their questions."
- Kevin Michaluk, Founder, CrackBerry.com
Developers, for more information about the BlackBerry Developer Community please review Join the Conversation on the BlackBerry Developer Community Forums found on Inside BlackBerry.
10-19-2013 02:37 PM
I am trying to load local html page that contains img loaded by the app in "data" folder, so in the html doc image must be inserted like as
<img src="local:///data/this_is_img.png" alt="My Image" />
and this is not working, also if img has full path starting from "file://"
But if image is located in assets this is working :
<img src="local:///assets/this_is_img.png" alt="My Image" />
So, question is how to insert image from data folder ?
10-19-2013 03:23 PM - edited 10-19-2013 03:24 PM
Because it's not local, it can be accessed using QDir::homePath()...
10-19-2013 03:31 PM
I found that this is maybe a problem because similar question was not solved
I tried this but only the first image is displayed, so how to open image from data folder ?
ng" alt="My Image" /> <img src="file:///main_menu_menu_btn_selected.png" alt="My Image" /> <img src="file:///../../../../../../data/icons/resize/7 2x72/182.png" alt="My Image" /> <img src="file:///../../../../../data/icons/resize/72x7 2/182.png" alt="My Image" /> <img src="file:///../../../../data/icons/resize/72x72/1 82.png" alt="My Image" /> <img src="file:///../../../data/icons/resize/72x72/182. png" alt="My Image" /> <img src="file:///../../data/icons/resize/72x72/182.png " alt="My Image" /> <img src="file:///accounts/1000/appdata/com.example.tes tapp.testDev_mple_testapp5dbaf0_/data/icons/resize /72x72/184.png" alt="My Image" /> <img src="file://accounts/1000/appdata/com.example.test app.testDev_mple_testapp5dbaf0_/data/icons/resize/ 72x72/184.png" alt="My Image" /> <img src="file:///accounts/1000/appdata/com.example.tes tapp/data/icons/resize/72x72/184.png" alt="My Image" />
10-19-2013 03:41 PM
You'll see from that post that I indictated a difference between how file: and local: are handled within WebView.
Your only option currently is to place you files in a shared directory and access from there.
Remembering to remove the files after use so not to fill the users folders, I would recommend a tmp folder.
10-19-2013 03:44 PM
10-19-2013 04:04 PM
If you think of it from a security point of view it makes perfect sense for file and local to be handled differently, what's not clear however is why local is not able to access the data directory I see no reason why a relative path should not work. However I have tried many variations and cannot get it to work so there is some underlying mechanism there for some reason currently only clear to the OS designers.
10-19-2013 04:59 PM
tried with no luck, no images are displayed
(permissions added, image is copied to shared folder)
2/182.png" alt="My Image" /> <img src="file:///accounts/1000/appdata/com.example.tes tapp.testDev_mple_testapp5dbaf0_/shared/misc/testa pp/icons/resize/72x72/182.png" alt="My Image" />