saswati sanyal
saswati sanyal

Reputation: 11

How to open the Camera Roll folder from Windows Phone app

I want to open the camera roll folder from my Windows Phone app. Please help me here.

Just a fyi, I don't want to save image into Camera Roll.

Thanks

Saswati

Upvotes: 1

Views: 1094

Answers (2)

Olivier Payen
Olivier Payen

Reputation: 15268

The simplest solution is to use the PhotoChooserTask.

Upvotes: 1

Benoit Catherinet
Benoit Catherinet

Reputation: 3345

Something like this should work:

MediaSource mediaSource = MediaSource.GetAvailableMediaSources()
            .First((source => source.MediaSourceType == MediaSourceType.LocalDevice));
using (MediaLibrary mediaLibrary = new MediaLibrary(mediaSource))
{
     PictureAlbum cameraRollAlbum = mediaLibrary.RootPictureAlbum.Albums.First((album) => album.Name == "Camera Roll");
     //Use cameraRollAlbum.Pictures. to access picture
}

Just make sure that you add the ID_CAP_MEDIALIB_PHOTO capabilities in your WMAppManifest

Upvotes: 1

Related Questions