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
Contributor
sandeepsagar_k
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
peter_strange
Posts: 19,612
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
sandeepsagar_k
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
peter_strange
Posts: 19,612
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
sandeepsagar_k
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
peter_strange
Posts: 19,612
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
sandeepsagar_k
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
MSohm
Posts: 14,864
Registered: ‎07-09-2008
My Device: BlackBerry Passport

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.
Found a bug? Report it using Issue Tracker
New Member
Neelam_Ramesh
Posts: 2
Registered: ‎01-09-2012
My Device: BB 8520

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