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
rcmaniac25
Posts: 1,804
Registered: ‎04-28-2009
My Device: Z10 (STL100-4)-10.2.1.2174, Z10 (STL100-3)-10.3.0.700 Dev OS, Z30 (STA100-5)-10.3.0.700 Dev OS, PlayBook (16GB)-2.1.0.1917
My Carrier: Verizon
Accepted Solution

3rd party library dependency

This is mainly just a theoretical question but say I have two applications that each uses the same 3rd party library. If I were to install both applications, either through Desktop Manager, App World, or the web browser, would it install the 3rd party library twice? If not, will it update the library if a newer version is available?
---Spends time in #blackberrydev on freenode (IRC)----
Three simple rules:
1. Please use the search bar before making new posts.
2. "Like" posts that you find helpful.
3. If a solution has been found for your post, mark it as solved.
--I code too much. Well, too bad.
Please use plain text.
Developer
Developer
CMY
Posts: 1,122
Registered: ‎02-10-2009
My Device: 8130 / 8350 / 9530 / 9550 / 9850 / PlayBook
My Carrier: Verizon

Re: 3rd party library dependency

1) If the library is specified to be installed in the jar/alx file then it will overwrite the old version, which may break the original app.

2) No it will not prompt to upgrade unless you put in logic to check for an upgrade.

Please use plain text.
Developer
rcmaniac25
Posts: 1,804
Registered: ‎04-28-2009
My Device: Z10 (STL100-4)-10.2.1.2174, Z10 (STL100-3)-10.3.0.700 Dev OS, Z30 (STA100-5)-10.3.0.700 Dev OS, PlayBook (16GB)-2.1.0.1917
My Carrier: Verizon

Re: 3rd party library dependency

Woops, maybe I worded it wrong.

1. If two apps from different compaines were installed and they both used the same 3rd party library would it install the library twice or would it detect that a version that is greater then or equal too the library needed is installed and it would just install the app and not the library?

2. When you install a app and it detects that the library installed is older then the version used, would it update it upon install?

---Spends time in #blackberrydev on freenode (IRC)----
Three simple rules:
1. Please use the search bar before making new posts.
2. "Like" posts that you find helpful.
3. If a solution has been found for your post, mark it as solved.
--I code too much. Well, too bad.
Please use plain text.
Developer
geeneeus
Posts: 80
Registered: ‎09-12-2009
My Device: Bold 9700
My Carrier: Vodafone UK

Re: 3rd party library dependency

In my experience yes. During the update process if I've previously installed a library it will tell me theres a conflict, if the version is lower it also asks if i want to update (obviously say no) but it will prompt in my experience.

Genius Development Scotland
Website: http://www.genius-dev.co.uk
Please use plain text.
Developer
Posts: 1,474
Registered: ‎04-14-2009
My Device: Not Specified

Re: 3rd party library dependency

If I recall correctly, updates via BES OTA Push don't prompt the user.

 

Also, I vaguely remember (and I'm not sure whether it's true at all), that a combination of vendor name and module name is supposed to be used internally in the OS to uniquely identify modules. So, if that's true, in theory you could have several modules with the same name as long as they come from different vendors. I've never tried this and I'm a bit sceptical.

Please use plain text.
Developer
rcmaniac25
Posts: 1,804
Registered: ‎04-28-2009
My Device: Z10 (STL100-4)-10.2.1.2174, Z10 (STL100-3)-10.3.0.700 Dev OS, Z30 (STA100-5)-10.3.0.700 Dev OS, PlayBook (16GB)-2.1.0.1917
My Carrier: Verizon

Re: 3rd party library dependency

geeneeus, when you say "it will tell me theres a conflict" do you mean it will say a newer version exists that version already exists? Do you know if this happens when you install as well or only when you update an app?

 

klyubin the app is not what I care about, the library is what I care about.

 

I am working on a library which is, in my opinion, a VERY LONG way off from being released but I would like to release it. The problem is I have many things planned for the library (and use it for my own apps) and worry that the library which is about 1.5mb would get installed more than once and if I update my app or someone else using my library installs a newer version of the library that it just install another copy of the library instead of updating and overriding the older library.

 

I know that 1.5mb for a library is big and plan to have a split up version to reduce size but right now (since I don't think it is possible to have a "super" library and a smaller version of the library without changing/recompiling code and that you can't check if a more advanced version of the library is already installed).

 

That is the whole background on this question. If me, person A, company B, and group C all created apps using this library would the user get multple copies of this library? If an older one exists would it get replaced? If a newer one exists I doubt that the installation of the now-older version would not occur. I don't know if this information would benefit others but I don't want to make a library that would get released only to have it pull and iPhone and need 50mb to install because 10 other versions are already installed.

---Spends time in #blackberrydev on freenode (IRC)----
Three simple rules:
1. Please use the search bar before making new posts.
2. "Like" posts that you find helpful.
3. If a solution has been found for your post, mark it as solved.
--I code too much. Well, too bad.
Please use plain text.
Developer
geeneeus
Posts: 80
Registered: ‎09-12-2009
My Device: Bold 9700
My Carrier: Vodafone UK

Re: 3rd party library dependency

As long as the names of the .cod files never change then you will be prompted to update to a newer version or if there are conflicting version (equal or lower).

 

If you name it say MyAppLib.cod

and change it to AppLib.cod

then you will have two copies of essentially the same Library

 

So consistent names will ensure that the Library will always be updated with the latest one each time and the user am sure is smart enough to know which version number is higher so knows which one not to update on top of. Even if its a higher version thats currently being installed the user is prompted saying that a newer version is available and will give the user the option.

Genius Development Scotland
Website: http://www.genius-dev.co.uk
Please use plain text.
Developer
rcmaniac25
Posts: 1,804
Registered: ‎04-28-2009
My Device: Z10 (STL100-4)-10.2.1.2174, Z10 (STL100-3)-10.3.0.700 Dev OS, Z30 (STA100-5)-10.3.0.700 Dev OS, PlayBook (16GB)-2.1.0.1917
My Carrier: Verizon

Re: 3rd party library dependency

Perfect, thank you.
---Spends time in #blackberrydev on freenode (IRC)----
Three simple rules:
1. Please use the search bar before making new posts.
2. "Like" posts that you find helpful.
3. If a solution has been found for your post, mark it as solved.
--I code too much. Well, too bad.
Please use plain text.