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
Posts: 206
Registered: ‎02-22-2011
My Device: BB TORCH & 9800
My Carrier: idea

Same App .cod size is varying with different OS(S)

Hi All

 

I excluded the .svn files from my src&res.


I have an App when Im trying to make build in 5.0 the cod size shown me 7.6 MB

Same App when Im trying to make build in 6.0 the cod size shown me 7.6 MB

But in 7.0 the size shown only 5.11 MB

 

Why this type of different cod file sizes are happening for the same App.

 

Any way we want less cod size but with 5.0 how its possible to get the minimum size.


*****************************************************************************
* Give kudos when you like it
* Mark it as a solution if it fixes your issue
Developer
Posts: 16,932
Registered: ‎07-29-2008
My Device: Z10 LE, Z30, Passport
My Carrier: O2 Germany

Re: Same App .cod size is varying with different OS(S)

quite a big application, do you have so many resources (pictures) you use?
i would suggest opening the jar file with a program like 7zip to check if all contents are correct.

the build size varies between OS versions, but usually it is very similar on 5, 6 and 7, so i would check the jar contents and compare them.
----------------------------------------------------------
feel free to press the like button on the right side to thank the user that helped you.
please mark posts as solved if you found a solution.
@SimonHain on twitter
Developer
Posts: 206
Registered: ‎02-22-2011
My Device: BB TORCH & 9800
My Carrier: idea

Re: Same App .cod size is varying with different OS(S)

Hi simon,
Yes, In My App due to compatibility for torch/bold/curve I used different images in res.
But not getting why there is difference in between size of 2MB for the same App in 5.0/6.0 OS and 7.0 OS.
Can't we run the project which is more that 7.5 MB?
*****************************************************************************
* Give kudos when you like it
* Mark it as a solution if it fixes your issue
Developer
Posts: 19,636
Registered: ‎07-14-2008
My Device: Not Specified

Re: Same App .cod size is varying with different OS(S)

[ Edited ]

Like SImon I would expect a difference in the size of the cods produced in various OS's, but not to that extent.  As Simon also suggested, look at the generated jar using your favorite Zip tool, unzip it, and then compare the sizes of the various components.  What makes up the extra Megabytes in the OS 5.0 app?

Developer
Posts: 206
Registered: ‎02-22-2011
My Device: BB TORCH & 9800
My Carrier: idea

Re: Same App .cod size is varying with different OS(S)

Yes peter and simon,

 

 

I have compared the two jar file contents and I found some difference between image sizes.

Here the images are same but while packing why those are getting different sizes.

And what is the solution for getting minimum size cod file in OS 5.0 also?

 

Help me.

 

Thanks in advance.

*****************************************************************************
* Give kudos when you like it
* Mark it as a solution if it fixes your issue
Developer
Posts: 16,932
Registered: ‎07-29-2008
My Device: Z10 LE, Z30, Passport
My Carrier: O2 Germany

Re: Same App .cod size is varying with different OS(S)

maybe your images are converted to png? there is a setting for that.
----------------------------------------------------------
feel free to press the like button on the right side to thank the user that helped you.
please mark posts as solved if you found a solution.
@SimonHain on twitter
Developer
Posts: 206
Registered: ‎02-22-2011
My Device: BB TORCH & 9800
My Carrier: idea

Re: Same App .cod size is varying with different OS(S)

Yes, My images are converting to png. If we select and un-select that option there is no change in .cod size simon.
*****************************************************************************
* Give kudos when you like it
* Mark it as a solution if it fixes your issue
Developer
Posts: 19,636
Registered: ‎07-14-2008
My Device: Not Specified

Re: Same App .cod size is varying with different OS(S)

My understanding is that in OS 5.0 and before there is advantage in terms of BlackBerry processing, in using png files, even if they are bigger.  In OS 6.0 and OS 7.0 there is no advantage, and in fact in OS 7.0, jpgs are more efficient.  So if your are creating one build then stick with png files.  If you are doing multiple builds, then for the later OS's use the smaller file size.

 

Hope this helps. 

Developer
Posts: 206
Registered: ‎02-22-2011
My Device: BB TORCH & 9800
My Carrier: idea

Re: Same App .cod size is varying with different OS(S)

Thanks for the reply peter,

The solution for my problem is not yet clear in terms of how to achieve.

The App is working fine in 7.0 later OS(S) same App is giving problem in 6.0 & 5.0.

I checked the .cod size in all I realised that due to size difference of almost 2MB it is happening..

As you suggest I compared the 5.0 & 7.0 jars.. While comparing got to know that some images(.png) are showing the difference in their size.

I have to run the App from 5.0 onwards.

Waiting for your suggestions


*****************************************************************************
* Give kudos when you like it
* Mark it as a solution if it fixes your issue
Developer
Posts: 19,636
Registered: ‎07-14-2008
My Device: Not Specified

Re: Same App .cod size is varying with different OS(S)

OK I need clarification.  Let us concentrate only on the OS 7.0 Build and the OS 5.0 Build. 

 

What you seem to be saying is that the jar for the OS 7.0 build is smaller than the OS 5.0 build because some png files are a different size, specifically the OS 7.0 files are smaller.

 

Please confirm that is the situation.

 

If so, then two questions:

 

a) Why is your OS 7.0 Build using smaller png files?

b) Why can't you use these png files in your OS 5.0 Build? 

 

Can you perhaps attach an example of the same png from OS 7.0 jar and from OS 5.0 jar?