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
New Developer
Posts: 31
Registered: ‎07-06-2009
My Device: Not Specified

Background Image

Ok, so i have searched and as far as i can tell my PC must be possessed because when i try to add a background image to my app, all i get, when i try to download it is a message saying "invalid COD" or to that effect. Why?

 

so i tried changing the properties on the image, to say "don't build" This then downloads, but says that the image does not exist. Something about a null summart. litterally just says "null"

 

I'm ripping my hair out with this one.

 

few snippets of info, when i sign the COD, if i dont change the properties on the image i get 2 versions of my COD. #-1.cod and #.cod (regretably i cant show any code or the name Smiley Frustrated)

 

Its starting to get on my nerves now. All i want is a background image

 

I downloaded something from this forum "backgroundimage.zip" and even that compiled incorrectly. What am i doing wrong? or is it just that my computer is actually possessed?

Developer
Posts: 1,055
Registered: ‎01-25-2009
My Device: BlackBerry Bold 9650/BlackBerry Torch 9800

Re: Background Image

Sounds like you might be doing something wrong. How are you loading this application?

 

OTA (over-the-air), Desktop Manager or Javaloader?

 

How are you trying to see the image?

 

The reason you get two versions of your cod is because the image is increasing the cod to a size greater than 64 KB. Once it goes over this size, the cod(s) are split into 64 KB (or less) chunks called sibling cods.

Jerome Carty - Follow jcarty on Twitter@jcarty | #webworks-dev / #BlackberryDev on irc.freenode.net | My Apps
Click "Accept as Solution" if post solved your original issue.. Give like/thumbs up if you feel post is helpful
Highlighted
Developer
Posts: 178
Registered: ‎07-29-2008
My Device: Not Specified

Re: Background Image

If he is seeing a 907  invalid cod it means he is otaing with a jad. 

 

What i would recomend that you do is take you .cod file, rename it to a .zip file, extract the .zip file, and put the two resulting .cod files with the .jad file in your deploy directory.

New Developer
Posts: 31
Registered: ‎07-06-2009
My Device: Not Specified

Re: Background Image

Hey guys, thanks for the replies. Yeh the one above did solve that problem but now i have a different one. I get a "null" error for the bitmap?

 

Not sure what i am doig wrong...

 

 

VerticalFieldManager vfm = new VerticalFieldManager();
        Bitmap objBitmap = Bitmap.getBitmapResource( "EmergencyBackground.png");
        Background bg = BackgroundFactory.createBitmapBackground(objBitmap,Background.POSITION_X_LEFT,Background.POSITION_Y_TOP, Background.REPEAT_BOTH);
        

...


add(vfm);

 

Above is my code and below is a screeny of the project tree structure. Unfortunatly i cant show the file names, but i can and have shown the structure.

 

2739iE7D672B83BC674D8

 

Any help would be MUCH Appreciated.