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
dmglakewood
Posts: 296
Registered: ‎12-07-2008
My Device: Not Specified

How can a user select their background image for the app?

How would I go about implimenting a section for users to upload their own image into an app? Is there a prebuilt way of doing this rather easily or is it more compklex? I can build the menus and everything I'm just not sure how to allows the user to select an image and then bring that image into your app. Any help would be appreciated
Developer
acowart
Posts: 163
Registered: ‎07-16-2008
My Device: Not Specified

Re: How can a user select their background image for the app?

[ Edited ]

Unless something was added in 4.7, you'll need to implement a file chooser yourself.

 

I believe the JDE comes with a fileexplorerdemo that may be of use.

 

Edit - I'd use the file explorer demo as a base, but be sure to only show the user valid files (png, jpg, jpeg, etc.)

Message Edited by acowart on 02-28-2009 12:36 PM
Andrew Cowart | Metova
www.metova.com
New Developer
dupuyyann
Posts: 11
Registered: ‎01-21-2009
My Device: Not Specified

Re: How can a user select their background image for the app?

Filechooserexample is a good example for implements this function then once you selected your image you must override paint method and may use encodedimage class in order to resize your image to the screen size with scaleImage32 method