Click here to Skip to main content
12,623,511 members (32,689 online)
Click here to Skip to main content
Add your own
alternative version

Stats

3.1K views
2 bookmarked
Posted

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

, 2 Dec 2013 CPOL
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
Tunisia Tunisia
Microsoft Certified Professional, Big Data and Cloud Architect.
Mail : hadrichmed@gmail.com

You may also be interested in...

Pro
Pro

Comments and Discussions

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