12-01-2009 10:33 AM
Hi all.
I am having problems with OTA deployment of my app.
My application is composed of two parts:
A - the main application (system module)
B - the library
A, obviously or not, uses library B ![]()
I can successfully create a jad file which prepares both .cod files (including the sibling files) on the server.
OTA installation goes OK. The A is properly installed and B is a module listed under Application A modules.
Problem ?
When I later try to update the library (again OTA) I get the strangest error ever (overreacting?, maybe but see for yourself)
"B:vendor" contains a module called "B." A module with that name already exists in the "A" application. If you proceed, "A" will be replaced by "B:vendor." Proceed ? YES | NO
Of course, If I opt YES, the device must be rebooted and this is the funny part:
The B starts to exist in the application list !
Here is the .jad file:
Manifest-Version: 1.0 RIM-COD-Module-Name: Configuration RIM-COD-Module-Dependencies: net_rim_cldc,net_rim_xml,net_rim_xml_org,net_rim_satsa MIDlet-Jar-Size: 17316 MIDlet-1: ,, RIM-COD-Creation-Time: 1259675521 MIDlet-Jar-URL: B.jar RIM-COD-URL: B.cod RIM-Library-Flags: 2 RIM-COD-SHA1: b4 91 05 27 17 3c 46 c7 ba bd af 80 36 a4 c7 45 cd 66 5e 9e RIM-COD-Size: 48264 MicroEdition-Configuration: CLDC-1.1 MIDlet-Version: 4.6 MIDlet-Name: B MIDlet-Vendor: vendor MicroEdition-Profile: MIDP-2.0 RIM-MIDlet-Flags-1: 2
1) What do you see causing the problem ?
2) Is something like this possible:
a) OTA provisioning of A (app) + B (lib) and later on
b) OTA provisioning of just B (lib)
It seems the installer (in part b) assumes the library to be an application.
If this is not possible then is this an option:
3) creating a C application as a mule for library B like this:
a) OTA provisioning of A (app) + B (lib) and later on
b) OTA provisioning of mule app C (does absolutely nothing) + B (lib)
4) will library from part b overwrite the original one retrieved in part a? (of course I would change the version if that is relevant)
Thanks for sticking this far ![]()
Solved! Go to Solution.
12-01-2009 10:39 AM - edited 12-01-2009 10:40 AM
You're right -- there's no concept of a library-only JAD file. The OS seems to think that you're installing a new application B, consisting of your library only. Why do you need to upgrade the library only? Try offerring an app + library JAD as an upgrade, where the JAD references the same app module but a newer library module.
12-01-2009 10:47 AM
Hi, thank you for your input,
but I don't like that idea because it exposes my original app to the 'server guys'. I just want to offer an option to provision the updated library.
BTW the library carries settings for the main app, so the User has an option to update settings without reinstalling/updating the original app.
I would rather opt for solution 3) from my post. Do you think it is possible?
12-01-2009 10:53 AM
Be careful with option 3 (aka shared library, which is pretty much broken on BlackBerry at the moment). I hear that sometimes it might break app A (it won't be able to find the library anymore). I haven't tried scenarios where only a library is upgraded OTA...
12-01-2009 10:56 AM
I just had a disturbing experience:
OTA installation of A + B went fine.
I created C which also includes B (first version had a dependency but later on did not - same result).
When I tried to OTA install C + B the installer threw the same error as already described in the original post.
So there is no way to update a library over OTA ??
12-01-2009 11:48 AM
Haven't we been through all this already?
Given the current mixed implementation for shared cod files with OTA downloads, the only way that I can see that you are going to be able to update B without screwing A on some or all devices, is to have them as separate downloads, so Application A contains just cod A, and Application B contains cod B. This means, as you have found out, that there are two entries in the Applications List.
Alternatively, when you update B, package up the current A with it and replace the whole thing.
12-02-2009 02:49 AM
Thank you klyubin and peter.
Sorry if I hit a soft spot on you peter, that wasn't my intention.
I am gratefull to regretfully learn that a library cannot be updated. I guess that 'bug' renders the library usage completely missing the point. But I guess I'll just have to live with this.
Thank you again for your time.