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. New to the forum? Please visit the ‘Getting Started’ link below.
inside custom component

Cascades Development

Reply
Developer
BGmot
Posts: 1,010
Registered: ‎11-24-2011
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.

Please use plain text.
Developer
borceg
Posts: 670
Registered: ‎03-21-2012
My Carrier: Vip

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

Please use plain text.
Developer
BGmot
Posts: 1,010
Registered: ‎11-24-2011
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.

Please use plain text.
Developer
borceg
Posts: 670
Registered: ‎03-21-2012
My Carrier: Vip

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

According to the article, it's only possible through c++.
Please use plain text.
Developer
BGmot
Posts: 1,010
Registered: ‎11-24-2011
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.

Please use plain text.