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

Web and WebWorks Development

Reply
New Contributor
Posts: 5
Registered: ‎05-06-2010
My Device: Blackberry 8520
My Carrier: TELCEL
Accepted Solution

How to save photos in a folder without showing in the photo gallery of BB10

I want to develop an application to take pictures, but i want these used it in the app and you can't see in the photo gallery, is this possible?

Retired
Posts: 856
Registered: ‎07-15-2008
My Device: Passport
My Carrier: Bell

Re: How to save photos in a folder without showing in the photo gallery of BB10

Any images that are saved to the application's home directory, or any location within the app besides the shared folder, will not be seen in the photo gallery.

Tim Windsor
Open Source Technical Lead
Retired
Posts: 1,561
Registered: ‎04-12-2010
My Device: BlackBerry Z10
My Carrier: Bell

Re: How to save photos in a folder without showing in the photo gallery of BB10

[ Edited ]

If you are working in the shared folder, you could also ZIP the application's resources (photos) into an archive; though that does add some overhead for accessing the resources as the number of files increase. Using a minimal compression method could reduce the impact.

 

EDIT: One other option is storing the images as data URIs in Local Storage or an HTML5 Database.


Erik Oros | @WaterlooErik | eoros@blackberry.com | Developer Issue Tracker

If a reply has answered your question, please click Accept as Solution to help other visitors in the future.
New Contributor
Posts: 5
Registered: ‎05-06-2010
My Device: Blackberry 8520
My Carrier: TELCEL

Re: How to save photos in a folder without showing in the photo gallery of BB10

I'm sorry but I have not found information about the 2 solutions

 

1)I don't know how I can change the picture to a location within my application, I think the move to file invoker could help?, Since the invoker method returns the path where you saved, and not accept a path like param.

 

 

2) I can't find examples like WebWorks transform an image as data URIs.

 

Will you have some link with information about this that you can share ?

 

Thanks for your help.

Retired
Posts: 1,561
Registered: ‎04-12-2010
My Device: BlackBerry Z10
My Carrier: Bell

Re: How to save photos in a folder without showing in the photo gallery of BB10

For (1), if you are using the HTML5 Filesytem APIs to save the image, it should be saved to your application-space by default unless you explicitly leave the sandbox via:
blackberry.io.sandbox = false;

Documentation:
https://developer.blackberry.com/html5/apis/blackberry.io.html

Regarding the data URIs, the easiest route is to create a <canvas> element in JavaScript, draw the image to the canvas, and then retrieve the data URI through the canvas APIs. There is a lot of good information on this integration here:
http://www.html5rocks.com/en/tutorials/canvas/integrating/

Erik Oros | @WaterlooErik | eoros@blackberry.com | Developer Issue Tracker

If a reply has answered your question, please click Accept as Solution to help other visitors in the future.