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: 3
Registered: ‎04-08-2011
My Device: Blackberry Torch

specifying storage location for photo app

Hi, I am trying to get a photo app developed for BB10 (for both phone and PlayBook) and had some questions.

 

1.) Is it possible to creat a specific folder for photos and have an app then save directly to that folder instead of the default album folder? If so do I need anything special for this?

 

2.) Can the photo appear automaticly in the app once taken instead of having to go and get it in the specific folder?

 

Sorry for the newb questions, this is my first time in app developpement so I am greatful for any help.

 

 

BlackBerry Development Advisor
Posts: 115
Registered: ‎06-06-2011
My Device: 9800

Re: specifying storage location for photo app

1) Your app can simply read the shared/camera folder where all the pictures are saved from the camera. Or it can read shared/pictures folder. You can directly access these using file:/// if you have the correct permissions in your app.

Here is an example of rendering an image that is taken from camera.
https://github.com/nukulb/WebWorks-Community-APIs/tree/jam35/BB10/screen/TestApp

If you are creating a new directory you will have to copy the file. You can use the unsandboxing nature of the FilSystem API to do this.

API Docs for reading a file, similar APIs are available for copying files
https://developer.blackberry.com/html5/apis/blackberry.io.html

This does some reading of a file to
https://github.com/blackberry/BB10-WebWorks-Samples/blob/master/fileTransfer/app/xhr2.html

2. Automatic for whom? for your user. For sure, you can simply read the file on specific intervals or wait for an event.
@nukulb
BlackBerry Development Advisor
Posts: 115
Registered: ‎06-06-2011
My Device: 9800

Re: specifying storage location for photo app

btw I will be posting a sample of picture viewer, I will tweet when its ready @nukulb

@nukulb