Thank you for visiting the BlackBerry Support Community Forums.
BlackBerry will be closing the BlackBerry Support Community Forums Device Forums on April 1st (Developers, see below)
BlackBerry remains committed to providing excellent customer support to our customers. We are delighted to direct you to the CrackBerry Forums, a well-established and thorough support channel, for continued BlackBerry support. Please visit http://forums.crackberry.com or http://crackberry.com/ask. You can also continue to visit BlackBerry Support or the BlackBerry Knowledge Base for official support options available for your BlackBerry Smartphone.
"When we launched CrackBerry.com 10 years ago, we set out to make it a fun and useful destination where BlackBerry Smartphone owners could share their excitement and learn to unleash the full potential of their BlackBerry. A decade later, the CrackBerry community is as active and passionate as ever and I know our knowledgeable members and volunteers will be excited to welcome and assist more BlackBerry owners with their questions."
- Kevin Michaluk, Founder, CrackBerry.com
Developers, for more information about the BlackBerry Developer Community please review Join the Conversation on the BlackBerry Developer Community Forums found on Inside BlackBerry.
12-17-2010 06:49 PM
Hi to everyone.
I have a question:
What is the process to create a library which will be used inside different apps by calling for example LibOpen, LibClose methods and also if it will be replaced by another new version then new features will be available for this app ?
For example for bb was easy one *cod file with calls of mehtods from the library and another *.cod file for the library.
How about playbook process achieving the same thind describe for bb or even how to cover these process ?
Thank in advance.
Solved! Go to Solution.
12-17-2010 07:06 PM
You can create AS libraries, but they would be considered "static" since they get compiled with the main application.
It sounds like you want to create a "runtime" library that your application links against at runtime. In the UNIX world, these are called "shared objects" or "SO" files, not to be confused with shared objects in AS. Since the OS is UNIX based, there is not a concept of runtime libraries for AS applications like there is for UNIX (or Windows) based applications.
12-20-2010 10:39 AM
How about 2 *.bar files one will be the library and another one will be the app whihch is using methods from that library.
Or as for Android in the *.bar file we can have another file which can be changed by unzip the *.bar file and then replace it with a new file - represent a new library.
Is that possible or not ?
12-20-2010 10:53 AM
You cannot created 2 bar files - one application cannot access resources of another application. If you have two apps using the same library just package this library in each one.
12-20-2010 11:28 AM
If you're looking at loading different behavior, you could look into Modules and define a clear Interface that each module needs to implement. You can then load the desired module at runtime and communicate to the module via the interface defined. Not certain if this is supported in the PB, but would be very easy to test. But modules, like SWF cannot be shared across application install boundaries.
12-20-2010 11:30 AM
I know that if the *.bar file is unzipped then inside we could find 3 files *.swf, *.png and *.xml file. Is there possible to add another file as a library (*.swc) or even other file which could be replaced then *.bar file zip it back and used as a new built ?
12-20-2010 11:34 AM
You can put whatever you want there (in the bar). In command line you just add extra argument - library.swc file, in FB you need to put it in src so it will end up in bin-debug. Or more proper approach would be to add a cusom builder which would copy this library to bin-debug or bin-release folder of the main project when you re-compile your library project.
12-22-2010 06:58 PM
Hi Elena. Other files are comes out after compilation , but *.swc file doesn't come . If the *.swc file was in the lib folder or even was added to flex lib path then the project was compiled ok. But I am looking for scenarion when if the bar file is unzipped then I can remove the old swc file with a new one and as a result I will have a new bar file wihtout compiling it again, that is my target to achieve . Any ideas ?
12-23-2010 10:26 AM
I don't wanna create a "runtime library" (RSL) , and I don't wanna the app to be linked against at runtime. The only thing I want is:
1) Unzip the *.bar file
2) Change the *.swc library with a new version
3) zip ti *.bar file back
4) sign it
5) push it to playbook
To achieve that I have created a flex *.swc library. Then inside the app for flex buld path I have added the *.swc file and the project was compiled OK. But in output folder , even in *.bar file this file is not present, I found an article about library types:
which explain about 3 types of library. But no chanse to get that *.swc library inside the *.bar file , also I have used the second type external but no *.swc file was created inside the *.bar file and also it seems that my app doesn't work showing just a gray stage ...
Also if that process is not gonna work , how about another *.swf file as a library inside the app src folder , but how to use those *.as classes like I did by using *.swc file: newPage:LibrarySprite= new LibrarySprite(sw, sh) ?
Any suggestion from your experince will be nice.
Thank you in advance.
12-24-2010 09:03 PM
You can do it all though command line.
Copy all files you need (or unzip if you wish), including swc in a directory x, and invoke blackberry-airpackager to package it all. Signing is not needed now. To install into Simulator add couple more options to airpackager (such as -installApp and -launchApp). If you want to deploy existing bar file you can use blackberry-deploy tool.