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

Java Development

Reply
Developer
noopesh
Posts: 60
Registered: ‎05-04-2011
My Device: Torch 9800, Bold 9700, Curve 9380

Unable to access the res images from a library project

[ Edited ]

Hi all,

 

I have created two BB projects: one blackberry application and the other is library project. Thus added dependency of that library project on the blackberry application. The library project contains only the images in the res directory.

 

Now in my app,I am trying to develop a webpage in which I am taking images from the the library project. But the image is not displayed on the page.

 

I have tried one more scenario:

I have created the jar of that library project, and added the jar to the application. Then I have the access for the images in the res directory.

 

If anyone have some idea, then please help.

 

Thanks in advance.

Please use plain text.
Developer
Anand04
Posts: 95
Registered: ‎06-05-2012
My Device: Developer

Re: Unable to access the res images from a library project

Hi,

You have to create one class in your library src folder which access your library res images, then import this class in your main BB project and get image from lib.
Please use plain text.
Developer
noopesh
Posts: 60
Registered: ‎05-04-2011
My Device: Torch 9800, Bold 9700, Curve 9380

Re: Unable to access the res images from a library project

Thanks Anand04  for the quick reply.

 

But i want to use those images in my html page.

e.g.

 

<img src="some_image_from_library_project.png" />

 

Then i am unable to get the images from the library project.

But

<img src="some_image_from_jar.png" />

That is working fine for me.

 

If you have any idea regarding for the same, then please help.

Thanks in advance.

Please use plain text.
Developer
Anand04
Posts: 95
Registered: ‎06-05-2012
My Device: Developer

Re: Unable to access the res images from a library project

[ Edited ]

Hi noopesh,

are you using browserfield for displaying html text in BB screen?

if yes then you can use "local:///name of img folder/"

Please use plain text.