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
Trusted Contributor
Posts: 126
Registered: ‎10-15-2010
My Device: Torch 9850
My Carrier: Not specified

Retrieve internal memory images

Hi to all,
I am using customized Image picker in App,
http://supportforums.blackberry.com/t5/Java-Development/Display-Thumbnails-and-create-a-Photo-Picker...
The memory card option works and retrieves all images in sdcard where as the internal retrieves images from pictures folder only, but i want to retrieve camera images and all other images from the Internal memory.

My code is:

PhotoPicker picker;
if(lst_Photo.getSelectedIndex()==1){                    
                    picker = PhotoPicker.createInstance(
                            System.getProperty("fileconn.dir.memorycard"),
                            new ThumbnailListener());                            

                }else {
                    Logger.logEventInfo("Internal memro phot===");
                    picker = PhotoPicker.createInstance(                            
                            System.getProperty("fileconn.dir.photos"),
                            new ThumbnailListener());
                }
                try {        
                    picker.show();     
                } catch (Throwable t) {
                    Logger.logEventError("Err in phto picker:"+t.toString());
                }

 Please hepl me.

Trusted Contributor
Posts: 126
Registered: ‎10-15-2010
My Device: Torch 9850
My Carrier: Not specified

Re: Retrieve internal memory images

 Myself fixed by inupting the internal memory path in ThumbnailField class.

 

public void gatherFiles() throws IOException {
            Vector files = new Vector();
            if (_directory != null) {
                FileConnection dir = (FileConnection) Connector.open("file:///store/home/user/", Connector.READ);
                if (dir.isDirectory()) {
                    recurseDirectory(dir, files);
                }
                dir.close();
            }
            _files = new String[files.size()];
            files.copyInto(_files);
        }