HTML and CSS Reference
In-Depth Information
You've seen in past chapters that a Windows Store application can save any data in its own
reserved space. While this option was more than sufficient for the TodoList application you built, it
is arguably not a truly viable option for the Instant Photo sample application. The output produced
by Instant Photo consists of content that the user likely would want to make accessible to other
To achieve this goal, the best option is to save photos to the Pictures folder. Doing that requires
you to declare yet another capability. So open up the application manifest again, select the
Capabilities tab, and check Pictures Library, as in Figure 12-7.
FIGURE 12-7 Declaring the Pictures Library capability.
You may want to let users create a specific subfolder under their Pictures folder to hold all
the pictures they take with the Instant Photo app. Alternatively, you might want to do that
programmatically. That's what you'll do next.
Creating a subfolder for photos
An ideal time to create the Instant Photo subfolder is the first time the application is run on a given
device. Add the following code to the init method in the instantPhotoApp.js ile.
var picturesFolder = Windows.Storage.KnownFolders.picturesLibrary;
picturesFolder.createFolderAsync("Instant Photo",
.then(function (folder) {
instantPhotoApp.customFolder = folder;
Search WWH ::

Custom Search