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

Native Development

Reply
Developer
Posts: 1,068
Registered: ‎11-24-2011
My Device: PlayBook
My Carrier: x
Accepted Solution

Loading image into ImageView useing file:///

Hello,

according to this article http://supportforums.blackberry.com/t5/Cascades-Development-Knowledge/The-Different-Methods-of-Loadi... we should be able to load images QML using file:/// and absolute path.

For the life of me I can't load an image not only from shared /accounts/1000/shared/ subfolders but even from app's own data folder.

Can somebody share any *working* example of loading images into ImageView using file:///

Thanks.

Developer
Posts: 671
Registered: ‎03-21-2012
My Device: BlackBerry PlayBook 16GB
My Carrier: Vip

Re: Loading image into ImageView useing file:///

Developer
Posts: 1,068
Registered: ‎11-24-2011
My Device: PlayBook
My Carrier: x

Re: Loading image into ImageView useing file:///

So there is no way to do it without C++ part? what a convoluted way... but thanks will try tonight.

Developer
Posts: 671
Registered: ‎03-21-2012
My Device: BlackBerry PlayBook 16GB
My Carrier: Vip

Re: Loading image into ImageView useing file:///

According to the article, it's only possible through c++.
Highlighted
Developer
Posts: 1,068
Registered: ‎11-24-2011
My Device: PlayBook
My Carrier: x

Re: Loading image into ImageView useing file:///

borceg, approach posted by you works, thanks.

Also this simple thing works without any C++ use:

imageSource: "file:///accounts/1000/shared/camera/image.png"

Stupid me forgot to request "Shared Files" access for this app. Just thing to remember: path must be absolute. Because of that if you need to locate files inside your app's sandbox then you'd have to use C++ part.