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
Regular Contributor
rampelotti
Posts: 66
Registered: ‎05-26-2010
My Device: 9000 Bold
Accepted Solution

How to use lib project with blackberry projects.

Hello Experts!

 

I have a project that i use on more projects like as framework but always  i deploy my application on device i need to uninstall the other application that use it, to install my new application, i have a doubt if i can generate a single .cod with embebed framework...

 

Any suggestions.

 

regards, Rampelotti

Developer
peter_strange
Posts: 19,610
Registered: ‎07-14-2008
My Device: Not Specified

Re: How to use lib project with blackberry projects.

I am not aware of a way to merge different projects into the one cod file.  So the only way I know of to do this is to merge the library and the application, perhaps by cloning the library. 

 

The BlackBerry does cope very well with multiple classes using the same name and package.  So if you do clone your library, you will need to change the package name. 

Regular Contributor
rampelotti
Posts: 66
Registered: ‎05-26-2010
My Device: 9000 Bold

Re: How to use lib project with blackberry projects.

Hello peter_strange!

 

Thanks for reply.

 

Well, you are right but i have some doubts with my steps to deploy an application on devices, for sample, if i have two applications that use the same project lib, when i install that app´s and run, i receive a message that lib haven´t permission to "interprocess comunication" so i have to go to applications permissions to change it, it´s a problem because if you deploy two applications that have same project lib on client you have to do personal permissions, every deploy on client, so if you deploy applications on client by BES you have other problem, you have to remove a software configuration(SC), and configure a new SC and deploy it.

 

I think if it is normal process, it´s a great problem, if you think to do modularized applications you can´t do it because have this steps, that for a client that have a large scale of Blackberrys to deploy, this process is not applied.

 

Can you help me how you deploy applications on this scenary?

 

Regards, Rampelotti.

Developer
geeneeus
Posts: 80
Registered: ‎09-12-2009
My Device: Bold 9700

Re: How to use lib project with blackberry projects.

I think I understand your issue but may have interpretted it wrong but heres my reply anyway.

 

It is possible to create a Library/Framework .cod file and then use that in multiple projects without having to copy and duplicate code in other applications.

 

Simply put all common code in a separate Library/Framework project and compile it.

 

When its compiled you should see not only a .cod file but also a .jar file.

 

Include the .jar file in your new project as part of the Build Path/Library files.

 

After which, using the fully qualified namespace you can import classes and use the library files in as many projects without duplicate code in multiple applications.

 

Note: You will have to include the .cod file with the project and add the correct extra lines in the .jad and .alx file when deploying.

 

Let me know if you need further explanation on anything.

 

If this was the response you were looking for then remember to press accept solution or else I may have not understood what you were saying but would like to help futher.

Genius Development Scotland
Website: http://www.genius-dev.co.uk
Developer
peter_strange
Posts: 19,610
Registered: ‎07-14-2008
My Device: Not Specified

Re: How to use lib project with blackberry projects.

There are installation implications with using a Library cod that is shared across multiple applications. 

 

Do you include the Library cod in your application download, in which case your could get confusion when a user has two of your applications installed?

 

Or do you have a separate Library cod that you install, in which case the user has two downloads for the first application?

 

Search the forum for discussion on this.