Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7097829
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 28, 20262026-05-28T10:59:02+00:00 2026-05-28T10:59:02+00:00

i am develop app in Blackberry which have photo functionality. i want to get

  • 0

i am develop app in Blackberry which have photo functionality. i want to get photo from gallery and show it on Bitmap field. does any body have idea for this please send me.
thanx in advance..

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-28T10:59:03+00:00Added an answer on May 28, 2026 at 10:59 am

    FilePicker is the main concept; I am taking the SDCard images. So, before testing set the sdcard in simulator;

    Try this sample code:

    import net.rim.device.api.ui.picker.FilePicker;
    import net.rim.device.api.ui.picker.FilePicker.Listener;
    
    public class FilePickerScreen extends MainScreen implements FieldChangeListener
    {       
    Bitmap bitmap;
    ButtonField click;
    BitmapField bitmapField;
    public FilePickerScreen()
    {   
        setTitle("FilePicker Screen");
        createGUI();
    }
    
    private void createGUI() 
    {   
        add(new LabelField("Click to select the image", Field.FIELD_HCENTER));
        click=new ButtonField("Click");
        click.setChangeListener(this);
        add(click);         
        bitmapField=new BitmapField();
        add(bitmapField);
    }   
    
    private Bitmap getTheImage(String url) 
    {
        Bitmap bitmap=null,scaleBitmap=null;
        InputStream inputStream=null;
        FileConnection fileConnection=null;     
        try
        {
            fileConnection=(FileConnection) Connector.open(url);
            inputStream=fileConnection.openInputStream();           
            byte[] data=new byte[(int)fileConnection.fileSize()];           
            data=IOUtilities.streamToBytes(inputStream);
            inputStream.close();
            fileConnection.close();
            bitmap=Bitmap.createBitmapFromBytes(data,0,data.length,1);
    
            //You can return this bitmap otherwise, after this you can scale it according to your requirement; like...
            scaleBitmap=new Bitmap(150, 150);
            bitmap.scaleInto(scaleBitmap, Bitmap.FILTER_LANCZOS);           
        }
        catch (Exception e) 
        {
            try 
            {
                if(inputStream!=null)
                {
                    inputStream.close();                
                }
                if(fileConnection!=null)
                {
                    fileConnection.close();
                }
            } 
            catch (Exception exp) 
            {
    
            }
            scaleBitmap=Bitmap.getBitmapResource("noimage.png");//Your known Image;     
        }
        return scaleBitmap;
    }
    
    public void fieldChanged(Field field, int context)
    {
        if(field==click)
        {
            try 
            {
                FilePicker filePicker;
                filePicker=FilePicker.getInstance();
                filePicker.setPath("file:///SDCard/BlackBerry/pictures/");
                filePicker.setListener(new Listener() 
                {       
                    public void selectionDone(String path)
                    {
                        bitmapField.setBitmap(getTheImage(path));
                    }
                });
                filePicker.show();//it show what ever you select.
            } 
            catch (Exception e) 
            {
                StartUp.exceptionHandling(e.getMessage());
            }
        }       
    }   
    }
    

    I think this may be your requirement;

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I want to develop an app which records the call-duration etc.. when a call
I want to develop an app with the Spotify API. I have downloaded the
I want to develop a chat app for BlackBerry. I did search, but found
I want to develop app that get current location in background mode of app
I develop an app for iPhone / iPod Touch which has to have access
I want to develop an app based on the image in which thumbnails can
I develop an app which collects some data from internet. Then save it to
I have develop one app in which four box question are there. all question
I am trying to develop a BlackBerry application that will show data from an
We are about to develop a web app from scratch using ASP.Net, and would

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.