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


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.


Reply
Highlighted
Contributor
Posts: 20
Registered: ‎10-08-2010
My Device: Not Specified

CodeModule

Hi All,

   I am working on 5.0 OS.I had a cod file of size 273 KB.I had extracted them into modules.While i am using CodeModuleManager .createNewModule(codData.length, codData, codData.length); i am getting value as 0.Please let me know why it is failed.They are working well when i installed in mobile.But now i am getting like this.Please reply me.Thank You!!!

 

 

Sorry for My English............................

--Sagar
Developer
Posts: 19,636
Registered: ‎07-14-2008
My Device: Not Specified

Re: CodeModule

Are you attempting to supply the entire code in one byte array, or are you downloading each sibling and adding each separately?  I think the second approach is the only one that will work. 

Contributor
Posts: 20
Registered: ‎10-08-2010
My Device: Not Specified

Re: CodeModule

Hi peter strange,

 

    I am also Dividing the cod file into slibes of 64KB or less each.And i am doing for each slibe like this 

 

 

int handleCode=CodeModuleManager.createNewModule(codData.length, codData,codData.length);

 but i am getting 0 as result.Please specify on which cases it should failed to create a new module.How can i overcome this problem.Thank you in advance!!!

 

--Sagar
Developer
Posts: 19,636
Registered: ‎07-14-2008
My Device: Not Specified

Re: CodeModule

I may be wrong but I think that the process you need to use goes more like this:

 

for ( int i = 0; i < numberOfslices; i++ ) {

handleCode=CodeModuleManager.createNewModule(codData.length, sliceData,sliceData.length);

}

Contributor
Posts: 20
Registered: ‎10-08-2010
My Device: Not Specified

Re: CodeModule

Hi all,

 

   I had a cod file with size of 70KB.How can i create a new  module to it and how can i add it to a codemodulegroup..Please help me in solving this.Thanks In advance!!

--Sagar
Developer
Posts: 19,636
Registered: ‎07-14-2008
My Device: Not Specified

Re: CodeModule

[ Edited ]

From memory, there is a sample or a KB article that describes how to do this.  You might also find searching the forum useful, for example, do these help?

 

http://supportforums.blackberry.com/t5/Java-Development/Installing-multiple-cod-application-with-Cod...

 

http://supportforums.blackberry.com/t5/Java-Development/problem-with-installing-app-using-CodeModule...

Contributor
Posts: 20
Registered: ‎10-08-2010
My Device: Not Specified

Re: CodeModule

Thank you for your replies peter.But i had already maken the cod into slibes and one of that slibe is more than 64 KB.

--Sagar
BlackBerry Development Advisor
Posts: 15,885
Registered: ‎07-09-2008
My Device: BlackBerry PRIV
My Carrier: Bell

Re: CodeModule

[ Edited ]

The maximum size of a COD file is 128k.  It is made up of 64k of application space (complilied code) and 64k of resource space (bundled files, like images).  So a 70k sibling COD file is valid.  This example should help with the use of CodeModuleManager and CodeModuleGroupManager.

 

Programmatically install and upgrade applications

http://supportforums.blackberry.com/t5/Java-Development/Programmatically-install-and-upgrade-applica...

Mark Sohm
BlackBerry Development Advisor

Please refrain from posting new questions in solved threads.
Problem solved? Click the Accept As Solution button.
New Member
Posts: 2
Registered: ‎01-09-2012
My Device: BB 8520
My Carrier: Airtel

Re: CodeModule

Greetings...

 

I have an application which Programmatically install app2 and the app2 get installed perfectly but installed app menu is not working/ showing / jvm error or  and on clicking symbol key throws an jvm error on simulator .

 

When I manually install the app2 the above two issues are not there.

 

Please help me on solving the issue.

 

Thanks,

Ramesh