Click here to Skip to main content
Click here to Skip to main content

How to easily retreive your local photos, music, and playlists

, 2 Dec 2013
Rate this:
Please Sign up or sign in to vote.
This tip shows you how to easily retrieve your local images, playlists, and music in Windows Phone 8.

Introduction

This tip shows you how to easily retrieve your local images, playlists, and music in Windows Phone 8. 

Background

You want to create a Windows Phone 8 and you need to use or retrieve some data from your Windows Phone 8 Device. This is the case of your photos, your music, and your playlists. So, you mustn't forget the capabilities: ID_CAP_MEDIALIB_[AUDIO | PHOTO | PLAYLIST]

Using the code  

In order to retrieve your photos stored in your device, add the following code:

using (var library = new MediaLibrary())
{
   var images = library.Pictures;
}

To retrieve your local music, choose the property Songs of the object called library

library.Songs

And the same for the playlists:

library.Playlists

With these methods, you are able to save photos or music with some exceptions. Regarding music: it is important that the music you want to save is stored in the Isolated Storage of your application. For images, it is a little different, and you can pass a stream on your method. 

License

This article, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

Share

About the Author

Hadrich Mohamed
Student GlobalNet
Tunisia Tunisia
Software Engineering student in the International Institute of technology of Sfax (IIT),Microsoft Student Partner , IEEE IIT SB member, IIT Microsoft Club President And a condidate at Appli Academy 2013-2014.
I like creating Windows store, Android and Windows Phone 8 applications.
Mail : hadrichmed@gmail.com
Phone : +216 27 61 61 40
Follow on   LinkedIn

Comments and Discussions

 
-- There are no messages in this forum --
| Advertise | Privacy | Mobile
Web03 | 2.8.140814.1 | Last Updated 2 Dec 2013
Article Copyright 2013 by Hadrich Mohamed
Everything else Copyright © CodeProject, 1999-2014
Terms of Service
Layout: fixed | fluid