How to create a shared library with assets in blackberry10

I have a cascading C / C ++ project. Which I embed in a shared library. But when I expand libxxx.so, I just found the source, there are no assets. But I used the images in the Assets folder, which is part of my project. And it should also be included in the shared library. Thus, another application using this shared library can access these resources.

Actually, I found this problem while I tested my shared library from another cascading application and often got crashes due to a null pointer exception due to lack of assets. And the problem is resolved when I insert images from the catalog of my resources into the new catalog of project assets.

Now, my question is: how can I create a shared library along with my images in the resource directory? And how to use them from another cascading application so that the client does not need to worry about these images inside the resource directory?

In fact, I searched a lot, but did not find a solution for BB10. Please comment on your valuable suggestions.

Thanks.

+6
source share
1 answer

There is not much information in your question about the assembly process, but I will try to assume that you are talking about some packaging problems.

The shared library (lib * .so file) does not contain any assets. Assets are part of the * .bar package. They are listed in the bar-descriptor.xml file or transferred to the BlackBerry-nativepackager via command line flags. Add all the images you need to the bar-descriptor.xml see 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 want to share some assets between several applications, you can put them in the common area of ​​the bar package, see the 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

+4
source

Source: https://habr.com/ru/post/947356/


All Articles