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. New to the forum? Please visit the ‘Getting Started’ link below.
inside custom component

Java Development

Reply
Developer
Aman_vivek
Posts: 216
Registered: ‎02-18-2010
My Carrier: no

Re: how to open picture gallery with camera

[ Edited ]

you can use below code to open BlackBerry Gallery to select picture, below code open the gallery picker and return path of the image. Path may return null or blank string if you are chossing wallpaper or device secrict images.

 

private String openPictureFloder()
    {
        String selectedImagePath="";
        
        final FilePicker fp=FilePicker.getInstance();
        fp.setFilter(".jpg");
        
        fp.setListener(new Listener()
        {
            public void selectionDone(String arg0)
            {
                selectedImagePath=arg0;
            }
        });
        
        fp.setView(FilePicker.VIEW_PICTURES);
        fp.show();
        return selectedImagePath;
    }

 I hope this will work for you

Please use plain text.
Regular Contributor
nyerunkar
Posts: 67
Registered: ‎12-30-2010
My Carrier: Vodafone.

Re: how to open picture gallery with camera

amir.addMenuItem(ApplicationMenuItemRepository.MENUITEM_FILE_EXPLORER, ApplicationDescriptor.currentApplicationDescriptor()));

giving compile error ...
Thanks .,
Nilesh .
Please use plain text.
Regular Contributor
nyerunkar
Posts: 67
Registered: ‎12-30-2010
My Carrier: Vodafone.

Re: how to open picture gallery with camera

giving compile error
Thanks .,
Nilesh .
Please use plain text.
Developer
maadani
Posts: 729
Registered: ‎05-04-2011

Re: how to open picture gallery with camera

[ Edited ]

I'm guessing that 'ApplicationDescriptor' is not recognized (-> it should be imported) or you have too many ')'.

 

Am I right?

 

 

Please use plain text.
Regular Contributor
nyerunkar
Posts: 67
Registered: ‎12-30-2010
My Carrier: Vodafone.

Re: how to open picture gallery with camera

Sorry actually its my problem i write wrong code ...now i'm trying compile successfully...
Thanks .,
Nilesh .
Please use plain text.
Regular Contributor
nyerunkar
Posts: 67
Registered: ‎12-30-2010
My Carrier: Vodafone.

Re: how to open picture gallery with camera

Thanks a lot maadani .,

finally you solved my problem ....

 

 

 

Thanks .,

Nilesh

Thanks .,
Nilesh .
Please use plain text.
Regular Contributor
nyerunkar
Posts: 67
Registered: ‎12-30-2010
My Carrier: Vodafone.

Re: how to open picture gallery with camera

hey maadani i got all answer from you .thanks alot again...

 

i'm getting Path when i click on userDefined Menu.... but i need to go in menu is it possible when user click on center trackpad my menu get execute ...........?

 

Thanks .

Nilesh

 

Thanks .,
Nilesh .
Please use plain text.