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: 146
Registered: ‎07-03-2013
My Device: BB 9360
My Carrier: WIND
Accepted Solution

Remote source ImageView

Hello, 
Is it possible to use remote source for using ImageView component?
Currently, if i do the following:

ImageView {
     imageSource: "http://www.some-url.com/pic.jpg
}

 I get the following error:

"Unsupported scheme (http) used in url (http://www.some-url.com/pic.jpg). Image loading aborted." 

 

Thanks!

Developer
Posts: 6,152
Registered: ‎07-05-2012
My Device: Playbook, Dev Alpha C, Z10 LE, Z30
My Carrier: Orange

Re: Remote source ImageView

[ Edited ]

No, this is currently in the roadmap though.

 

One workaround is to use a WebView...

 

http://supportforums.blackberry.com/t5/Native-Development/Image-View-from-the-web/m-p/2570051#M46287

 

[Edit] Seeing this I now realise why @PhilipK has a ListView of WebView items, it's my fault for suggesting this workaround in the first place. Smiley Embarassed

 

 


If you've been helped click on Like Button, if you've been saved buy the app. Smiley Happy

Developer of stokLocker, Sympatico and Super Sentences.
Developer
Posts: 676
Registered: ‎05-06-2012
My Device: Dev Alpha & PlayBook
My Carrier: wifi

Re: Remote source ImageView

[ Edited ]

@BBSJdev I'm actually using a third party library called WebImageView.

 

https://github.com/RileyGB/BlackBerry10-Samples/tree/master/WebImageViewSample

_________________________________________________________
co-founder of Diaree | BB Dev for PictureThis
Developer
Posts: 146
Registered: ‎07-03-2013
My Device: BB 9360
My Carrier: WIND

Re: Remote source ImageView

Well this workaround worked for me. I will be happy to modify my code once the api gets updated!
Thanks
Developer
Posts: 6,152
Registered: ‎07-05-2012
My Device: Playbook, Dev Alpha C, Z10 LE, Z30
My Carrier: Orange

Re: Remote source ImageView

@PhilipK Oh good, I stand relieved. Smiley Happy

 


Philipk wrote:

@BBSJdev I'm actually using a third party library called WebImageView.

 

https://github.com/RileyGB/BlackBerry10-Samples/tree/master/WebImageViewSample


 


If you've been helped click on Like Button, if you've been saved buy the app. Smiley Happy

Developer of stokLocker, Sympatico and Super Sentences.
Developer
Posts: 6,152
Registered: ‎07-05-2012
My Device: Playbook, Dev Alpha C, Z10 LE, Z30
My Carrier: Orange

Re: Remote source ImageView

I see that it caches and is asynchronous so a good alternative if you are planning on having many images downloaded at once, as in a ListView for example.

 

@ you may like to set PhilipK's suggestion as a solution as well for anyone coming along later with the same problem.

 

 


If you've been helped click on Like Button, if you've been saved buy the app. Smiley Happy

Developer of stokLocker, Sympatico and Super Sentences.
Highlighted
Developer
Posts: 146
Registered: ‎07-03-2013
My Device: BB 9360
My Carrier: WIND

Re: Remote source ImageView

Temporary I am just trying to make things work. In the next couple of days, I will be optimizing it.
I will certainly look into the git repo.
Thanks again!