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

BlackBerry® World™ Development

Reply
Developer
Posts: 1,452
Registered: ‎11-06-2009
My Device: Torch 9810
My Carrier: WiFi

Re: URGENT: Only one App World app can be installed at a time; each use same common library

Hmm. From my experience SharedLibrary.cod will be replaced after Brand2 app install (which is causing the device restart message), but it makes no sense Brand1.cod to be replaced with Brand2.cod.

 

Let's test the OTA install to see if we can reproduce the issue. Please follow these steps

1) Create a dir on your webserver like myserver.com/app1

2) Unzip Brand1.cod and place all small sibling files in app1 dir

3) If SharedLibray.cod is bigger than 64 KB, unzip it and place sibling files in app1 dir; if it is less than 64KB just place the SharedLibrary.cod in app1 dir

4) Run UpdateJad utility (using Brand1.jad and SharedLibrary.jad) to produce one common jad file (MyApp1.jad)

5) Upload the common jad file to app1 dir

6) Start the browser on your BB and direct it to myserver.com/app1/MyApp1.jad

 

This will install Brand1 app. Create a dir app2 and repeat the steps above to install Brand2 app

 

Step 4) - if you don't have UpdateJad utility (it is part of the BB IDE, not sure about the Eclipse plugin) there is manual workaround, let me know if you need it and I will describe the steps



"When you become a level 3 developer, you learn to communicate over the ether. I'm told that level 5 developers are ascend into a higher level of existence beyond the physical realm." gord888 @ crackberry
Contributor
Posts: 35
Registered: ‎09-15-2011
My Device: Torch 9800, Tour 9630
My Carrier: VZW

Re: URGENT: Only one App World app can be installed at a time; each use same common library

OK, I tried it the updatejad way and still get "Download failed" - 906 Invalid Descriptor. This is on a Tour 9630 running OS 5.

 

Here is what the updated jad looks like:

 

Manifest-Version: 1.0
MIDlet-Jar-Size: 5039010
MicroEdition-Configuration: CLDC-1.1
MIDlet-Version: 1.3
RIM-COD-Size: 48220
RIM-MIDlet-Flags-1: 0
MIDlet-Name: Brand1
RIM-COD-URL-50: brand1-50.cod
RIM-COD-URL-9: brand1-9.cod
RIM-COD-URL-8: brand1-8.cod
RIM-COD-URL-49: brand1-49.cod
RIM-COD-URL-7: brand1-7.cod
RIM-COD-URL-48: brand1-48.cod
RIM-COD-URL-6: brand1-6.cod
MicroEdition-Profile: MIDP-2.0
RIM-COD-URL-47: brand1-47.cod
RIM-COD-URL-5: brand1-5.cod
RIM-COD-URL-46: brand1-46.cod
RIM-COD-URL-4: brand1-4.cod
RIM-COD-Size-50: 52840
RIM-COD-URL-45: brand1-45.cod
RIM-COD-URL-3: brand1-3.cod
RIM-COD-URL-44: brand1-44.cod
RIM-COD-URL-2: brand1-2.cod
RIM-COD-URL-1: brand1-1.cod
RIM-COD-URL-43: brand1-43.cod
RIM-COD-URL-42: brand1-42.cod
RIM-COD-URL-41: brand1-41.cod
RIM-COD-Size-9: 51596
RIM-COD-URL-40: brand1-40.cod
RIM-COD-Size-8: 51896
RIM-COD-Size-7: 59288
RIM-COD-Size-6: 51908
RIM-COD-Size-5: 53548
RIM-COD-Size-4: 51908
RIM-COD-Size-3: 51908
RIM-COD-Size-2: 51812
RIM-COD-Size-1: 53668
RIM-COD-Size-49: 51908
RIM-COD-Size-48: 51908
RIM-COD-Size-47: 57972
RIM-COD-Size-46: 51908
RIM-COD-Size-45: 59612
RIM-COD-Size-44: 57944
RIM-COD-URL-39: brand1-39.cod
RIM-COD-Size-43: 51896
RIM-COD-URL-38: brand1-38.cod
RIM-COD-URL-37: brand1-37.cod
RIM-COD-Size-42: 52040
RIM-COD-URL-36: brand1-36.cod
RIM-COD-Size-41: 56544
RIM-COD-URL-35: brand1-35.cod
RIM-COD-Size-40: 51908
RIM-COD-URL-34: brand1-34.cod
RIM-COD-URL-33: brand1-33.cod
RIM-COD-URL-32: brand1-32.cod
RIM-COD-URL-31: brand1-31.cod
RIM-COD-URL-30: brand1-30.cod
RIM-COD-Module-Dependencies: net_rim_cldc,shared_library,net_rim_bbapi_browser,net_rim_bb_browser_field2_api,net_rim_xml_org,net_rim_bbapi_invoke
MIDlet-Vendor: Vendor
RIM-COD-Size-39: 51908
RIM-COD-Size-38: 55168
RIM-COD-Size-37: 51908
RIM-COD-Size-36: 51908
RIM-COD-Size-35: 51908
RIM-COD-URL-29: brand1-29.cod
RIM-COD-Size-34: 57208
RIM-COD-URL-28: brand1-28.cod
RIM-COD-Size-33: 51908
RIM-COD-URL-27: brand1-27.cod
RIM-COD-Size-32: 51908
RIM-COD-URL-26: brand1-26.cod
RIM-COD-Size-31: 55292
RIM-COD-URL-25: brand1-25.cod
RIM-COD-Size-30: 51908
RIM-COD-URL-24: brand1-24.cod
RIM-COD-URL-23: brand1-23.cod
RIM-COD-URL-22: brand1-22.cod
RIM-COD-URL-21: brand1-21.cod
RIM-COD-URL-20: brand1-20.cod
RIM-COD-URL: brand1.cod
RIM-COD-Module-Name: brand1
RIM-COD-Size-29: 57972
RIM-COD-Size-28: 51896
RIM-COD-Size-27: 52168
RIM-COD-Size-26: 59316
RIM-COD-Size-25: 51908
RIM-COD-URL-19: brand1-19.cod
RIM-COD-Size-24: 43740
RIM-COD-URL-18: brand1-18.cod
RIM-COD-Size-23: 51908
RIM-COD-URL-17: brand1-17.cod
RIM-COD-Size-22: 56708
RIM-COD-URL-16: brand1-16.cod
RIM-COD-Size-21: 51908
RIM-COD-URL-15: brand1-15.cod
RIM-COD-Size-20: 51908
RIM-COD-URL-14: brand1-14.cod
RIM-COD-URL-13: brand1-13.cod
RIM-COD-URL-12: brand1-12.cod
RIM-COD-URL-11: brand1-11.cod
RIM-COD-URL-10: brand1-10.cod
RIM-COD-Size-19: 55944
RIM-COD-Size-18: 51908
RIM-COD-Size-17: 51908
RIM-COD-Size-16: 56976
RIM-COD-Size-15: 51908
RIM-COD-Size-14: 51908
RIM-COD-Size-13: 51812
RIM-COD-Size-12: 53644
RIM-COD-Size-11: 56980
RIM-COD-Size-10: 51908
MIDlet-1: Brand1,img/icon.png,
RIM-COD-SHA1-50: a3 b0 a3 af d4 49 a8 9e 33 dd 14 3e cf 41 7f fd e8 6c 48 c1
RIM-COD-SHA1: fa cd 5d 86 93 30 de d4 a7 e5 56 0f 5d 25 fe c6 21 b5 bb ec
RIM-COD-SHA1-49: 87 ad a3 48 cf c3 76 3d 7f b0 87 2d 32 3d e7 fd 2c 38 69 91
RIM-COD-SHA1-48: fa ef 21 bd e0 72 d3 cf 68 67 8c 55 84 1d 07 c4 0d f6 b1 07
RIM-COD-SHA1-47: fe 83 92 36 cf 97 30 b8 89 eb 70 6f 36 7d b8 44 7d c8 0b a6
RIM-COD-SHA1-46: 84 88 76 73 d4 94 fa 60 77 ab 79 f0 5e 27 d5 a8 1c be dc dc
RIM-COD-SHA1-45: 37 26 6f f3 2f 50 fe 15 a1 68 aa 1f 11 cc a4 39 a9 d7 b5 95
RIM-COD-SHA1-44: 77 95 68 6b a4 42 70 5f 4b b0 2c c2 47 b7 6d e2 6c eb 09 3f
RIM-COD-SHA1-43: 46 0f 61 ba fa ac 61 28 3b 73 6b 66 34 40 75 54 63 32 94 c5
RIM-COD-SHA1-42: 25 3f 5d f5 70 bf ca 99 44 ca 4f b7 9a 45 4e 67 6c 40 33 4c
RIM-COD-SHA1-41: a2 c0 d1 b5 ba 0a 9d 1c ef ae 87 c6 8f 2a 2d d1 b9 6e e0 8f
RIM-COD-SHA1-40: e1 51 af b6 36 7c f9 89 db f9 98 d0 81 8c 9e 75 a7 ae 1d 06
RIM-COD-SHA1-39: 78 ed 17 43 98 1b 7d 39 7a cb d1 92 5c b9 86 a1 49 b0 2f 1e
RIM-COD-SHA1-38: 4f d3 8d c7 cc e8 36 59 82 a7 05 dc b8 be 74 71 39 d2 35 bf
RIM-COD-SHA1-37: c4 8c ea 6c ee f7 43 2c ef 2f 55 69 36 7d c0 aa b6 fb de 9f
RIM-COD-SHA1-36: 4a 85 f6 e6 ee 9e c0 b0 e4 35 3e 55 b1 f2 c3 c7 a3 a8 9c f3
MIDlet-Jar-URL: Brand1.jar
RIM-COD-SHA1-35: 9b eb e6 81 90 56 9f 0e 94 88 7c fc 1c 8c 84 13 1e 27 f3 be
RIM-COD-SHA1-34: 2d 8c 09 4e 8b eb cd e3 49 fc 40 33 f7 73 d5 1b a2 1c 06 39
RIM-COD-SHA1-33: f7 5b 28 5d 81 92 76 4e bf f2 ae 14 1a fe dd ce d8 39 4a 35
RIM-COD-SHA1-32: 49 b6 00 dd 77 59 11 da b7 35 78 0d 26 99 cb 1d bb 2f 15 2a
RIM-COD-SHA1-31: 8b f6 90 d4 c8 a2 f3 24 19 de 61 c3 1a 1c f8 56 14 2f f6 66
RIM-COD-SHA1-30: 01 61 57 77 cb 8a 92 cb 10 7a d3 99 c1 fc bd 54 0f 81 f9 67
RIM-COD-SHA1-9: ba 03 ea 23 fd 46 80 dc 86 5f ac 0a 30 22 00 3b 43 44 6f 7b
RIM-COD-SHA1-8: 88 c2 04 4a f0 20 70 b8 01 b3 7a b2 05 fa bd 95 f7 1e 16 89
RIM-COD-SHA1-7: d0 ab aa 51 1d d6 53 b6 9a 7e b4 48 5d 20 64 d0 b5 6a 7f 34
RIM-COD-SHA1-6: 8b 6e 8e de dc a6 4a 59 4e 96 76 ed d5 79 a1 98 6d 71 63 e3
RIM-COD-SHA1-5: 37 8b 78 be 0e f1 0a 29 5c 54 59 b7 87 bc 72 02 8c 86 aa 80
RIM-COD-SHA1-4: 9a 78 fe f3 67 7e c8 cd b8 47 be 2a 49 44 6f 37 a8 c5 94 4d
RIM-COD-SHA1-3: 6b fd 39 69 d1 b5 3b 60 13 11 51 f1 be d0 47 54 37 ac a8 22
RIM-COD-SHA1-2: 59 bd 4e e4 03 a5 71 ad 72 b0 aa 49 59 0e 25 9b 74 d3 15 9f
RIM-COD-SHA1-1: c4 fe 40 d0 98 56 13 8c 18 8c e7 7d 41 69 ed c2 08 c0 2c 12
RIM-COD-SHA1-29: 60 f7 ad 53 56 f9 dd 55 0a 33 70 c0 b2 54 04 06 9a cc ca e5
RIM-COD-SHA1-28: f1 08 9f 51 3f 7e 64 c3 94 82 83 32 5b 5d c4 6f 8c 3a a1 0a
RIM-COD-SHA1-27: 11 6a c7 a4 08 24 25 c5 c2 84 18 6b 92 6c b5 ed b1 18 16 35
RIM-COD-SHA1-26: aa 9e 53 66 d8 8c 27 09 21 75 b8 0a 38 d8 4c 96 f6 75 1e 5c
RIM-COD-SHA1-25: 88 2f 0b 26 14 0e 47 f1 97 06 6c 4a 78 74 4a 67 c5 5b e2 63
RIM-COD-SHA1-24: 8e dc 5f 5b 58 e4 45 74 3c 49 7b a6 de 10 ed f4 18 bd b1 a8
RIM-COD-SHA1-23: 10 e2 a4 fa 12 25 53 8d eb d0 29 e0 84 c7 d8 87 c1 fd 70 28
RIM-COD-SHA1-22: aa dc 82 80 13 83 f7 f3 40 71 63 c8 9f 33 f5 c7 60 14 0a e4
RIM-COD-SHA1-21: 67 22 00 38 99 0e c8 db 2f ad b3 42 ee 14 47 48 b3 2a 02 f7
RIM-COD-SHA1-20: 31 9f e5 9b 83 e1 14 16 b5 5c 26 cc 12 c6 38 4f f4 8c d1 2d
RIM-COD-Creation-Time: 1354756752
RIM-COD-SHA1-19: f4 88 76 c1 5d dc ab ae af 98 a3 b7 b6 05 4e 20 22 63 1e b0
RIM-COD-SHA1-18: 01 b6 93 ff 0e bc 3c 55 f0 1c 53 6f a7 2b b4 c0 f4 ba 8a e0
RIM-COD-SHA1-17: 50 16 cf 79 61 fc f9 6a 6b 93 dc 02 f3 bd 97 0a ac 78 75 35
RIM-COD-SHA1-16: 31 4c b1 ce bb d3 61 11 fd 73 4a ac 2c 63 3d c6 58 b8 f5 72
RIM-COD-SHA1-15: 9f e2 9d c5 14 80 84 48 ac 0e 7d 15 e2 ef 80 de ea c0 62 41
RIM-COD-SHA1-14: 79 c6 21 6b 1f 8e b3 97 3e e9 94 1a d3 66 6f f6 d0 ee 01 50
RIM-COD-SHA1-13: f2 0c 9b 33 e2 fe be 71 ac a7 88 6b 03 19 c4 eb 57 4a 52 3d
RIM-COD-SHA1-12: 78 68 de f2 4b 31 25 ce 8a 64 3a 17 ef aa 96 f7 05 36 56 85
RIM-COD-SHA1-11: 73 02 2d b1 b1 22 ad 29 88 49 92 ee f9 83 65 f7 0c 26 dc 3d
RIM-COD-SHA1-10: 0f 45 f1 3a 63 14 58 21 b7 98 7e 8a 4f 5e 9e 69 b8 9a bc 97
RIM-COD-URL-51: shared_library.cod
RIM-Library-Flags: 2
RIM-COD-Size-51: 90928

 

Developer
Posts: 1,452
Registered: ‎11-06-2009
My Device: Torch 9810
My Carrier: WiFi

Re: URGENT: Only one App World app can be installed at a time; each use same common library

Shared_library COD doesn't contain sibling files? I mean it is not an archive but a pure COD file?

Can you send me via PM the download link so I can test it on my devices? (Of course if it is OK with your company policy)


"When you become a level 3 developer, you learn to communicate over the ether. I'm told that level 5 developers are ascend into a higher level of existence beyond the physical realm." gord888 @ crackberry
Contributor
Posts: 35
Registered: ‎09-15-2011
My Device: Torch 9800, Tour 9630
My Carrier: VZW

Re: URGENT: Only one App World app can be installed at a time; each use same common library

That's correct, the shared library cod contains no siblings. I have tried to open/extract it with the zip utilities I have available to me and it can't be done.

 

I just tried the OTA install on a Torch 9800 with OS 6 and it worked (not sure why OS 5 wouldn't). Here is what happened:

 

Installed Brand 1 no problem.

Installed Brand 2. Got a prompt at the end saying ""Brand2:Vendor" contains a module called "shared_library." A module with that name already exists in the "Brand1" application. If you proceed, "Brand1" will be replaced by "Brand2:Vendor." Proceed?"

 

I selected "Proceed" and got "Device must be rebooted to complete install. Later, Reboot". Lo and behold, the Brand1 app was gone, even before I rebooted.

Developer
Posts: 1,452
Registered: ‎11-06-2009
My Device: Torch 9810
My Carrier: WiFi

Re: URGENT: Only one App World app can be installed at a time; each use same common library

So it is the OTA install fault.

Can you try installing with shared_library1.cod, shared_library2.cod etc. Just renaming the cods (and you need to modify the JAD file accordingly)


"When you become a level 3 developer, you learn to communicate over the ether. I'm told that level 5 developers are ascend into a higher level of existence beyond the physical realm." gord888 @ crackberry
Contributor
Posts: 35
Registered: ‎09-15-2011
My Device: Torch 9800, Tour 9630
My Carrier: VZW

Re: URGENT: Only one App World app can be installed at a time; each use same common library

Renaming the library cods unique names didn't help. I get the same message as before. It must be using the internal cod name, which is still "shared_library".

Contributor
Posts: 35
Registered: ‎09-15-2011
My Device: Torch 9800, Tour 9630
My Carrier: VZW

Re: URGENT: Only one App World app can be installed at a time; each use same common library

So is it not possible for multiple apps that share the same library module to be installed simultaneously from App World?

 

If so, it would be good to know so I can take that back to the customer and at least let them know it's an App World restriction. That way they can start looking at an OTA or ad-hoc distribution method instead.

BlackBerry Development Advisor
Posts: 15,300
Registered: ‎07-09-2008
My Device: BlackBerry Passport
My Carrier: Bell

Re: URGENT: Only one App World app can be installed at a time; each use same common library

Common Java libraries are not supported well on BlackBerry Smartphones.  Here's what is happening in this scenario.

 

  1. Brand 1 + shared library is installed together, creating a module group.
  2. Brand 2 + same shared library is installed, causing the library installed in #1 to be overwritten.
  3. During the reboot, cod files from the module group are deleted, which includes brand 1 app.

There are a couple of ways to fix this.  You could create a bundled library that is packaged within the cod files of the application itself.  Or you can slightly modify the shared library for each brand (create a new project with different package names).  You can read more details about these techniques here:

 

Working with Libraries - shared, bundled, releasing, and using 3rd Party SDKs

Mark Sohm
BlackBerry Development Advisor

Please refrain from posting new questions in solved threads.
Problem solved? Click the Accept As Solution button.
Found a bug? Report it using Issue Tracker