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
Contributor
peebee
Posts: 13
Registered: ‎09-23-2010
My Device: Not Specified

Re: Open Image Selector/Thumbnail File Browser

How about this...is there a way to invoke the Address Book application (e.g. Invoke.invokeApplication(Invoke.APP_TYPE_ADDRESSBOOK, new AddressBookArguments()), invoke the "Add Picture" menu, grab that screen somehow and push it onto your application's stack using pushScreen?

 

If this were possible, then this, along with a Journal Listener would probably do the trick.  Cross application communication doesn't seem possible though for obvious reasons.

 

I will keep digging.

Please use plain text.
Contributor
peebee
Posts: 13
Registered: ‎09-23-2010
My Device: Not Specified

Re: Open Image Selector/Thumbnail File Browser

I have to admit, I am baffled.  I can write a web app, place an <input type="file"... /> element on the form, and get support for a file/image list (picker) dialog, but Java developers cannot get access to this basic control?  I really do not get it.  So our only option is to create our own?  I honestly would not mind writing one, but if parsing the BBThumbs.dat file is our only option for an efficient implementation, I will have to submit to defeat.  I simply do not have the time.

 

This is unfortunate.  If someone has any other ideas, I'd be appreciative.

 

I think my only other fallback will be to simply invoke the Camera app to get a pic in real-time without support for allowing the user to pick and existing image on the device.

Please use plain text.
Developer
alupimp
Posts: 22
Registered: ‎03-05-2011
My Device: Not Specified

Re: Open Image Selector/Thumbnail File Browser

So any code you came up for this issue?

Please use plain text.
New Contributor
afterburnerltt
Posts: 2
Registered: ‎01-16-2012
My Device: 9800
My Carrier: Vodacom

Re: Open Image Selector/Thumbnail File Browser

I worked in revese on this. Instead of finding every image on the device and then finding its thumbnail image in thumbs96x96.dat etc I instead parsed the thumbnail file and extracted all the thumbnails with their paths and filenames directly from the file. I then checked if a file already exists before I displayed it to the user.

Please use plain text.
Contributor
pratuat
Posts: 33
Registered: ‎04-04-2011
My Device: 8350
My Carrier: Amazon

Re: Open Image Selector/Thumbnail File Browser

Could you pass on the work for the gallery picture selector ? I implemented it nasty way, reading and scaling all images in gallery and converting them to thumbnail. Yours implementation sounds good.

 

thanks

Please use plain text.