How to Create Shared Library with Assets in blackberry10
Asked Answered
C

1

6

I have a cascade C/C++ project. Which I build into a shared library. But when I expand the libxxx.so I just found the source codes, assets are not present there. But I did use images in my Assets folder, which is part of my project. And it should be included into shared library also. So, the another application using this shared library can access these assets.

Actually I found this problem while I test my shared library from another cascade application and it getting crashes frequently, because of null pointer exception due to lack of assets. And the problem is solved when I paste images from my assets directory to new project assets directory.

Now, my question is how can I build a shared library along with my images in assets directory? And how to use them from another cascade applicaton so the client need not to worry about those images inside assets directory?

Actually I search a lot but didn't came up with solution for BB10. Please comment your valuable suggestions.

Thanks.

Criminality answered 15/6, 2013 at 8:47 Comment(0)
M
4

There are not to much information about the build process in your question but I'll try to guess that you are talking about some packaging issues.

Shared library (lib*.so file) do not contain any assets. Assets are part of *.bar package. They are listed in the bar-descriptor.xml file or passed to a blackberry-nativepackager via command line flags. Add all images you need to the bar-descriptor.xml see this file documentation here: http://developer.blackberry.com/native/documentation/bb10/com.qnx.doc.native_sdk.devguide/com.qnx.doc.native_sdk.devguide/topic/r_blackberry_tablet_dtd_intro.html

If you would like to share some assets between several applications you can put them to a public area of the bar package see public attribute of the asset tag documentation here: http://developer.blackberry.com/native/documentation/bb10/com.qnx.doc.native_sdk.devguide/com.qnx.doc.native_sdk.devguide/topic/r_barfile_dtd_ref_asset.html

Milli answered 21/6, 2013 at 3:29 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.