I work with Windows Phone 8. I need to get the path to the audio file. For the image it is done simply.
PictureCollection pictures = library.Pictures; Picture singlePict = pictures[index]; path = singlePict.GetPath().ToString();
But for audio there is no such function. Therefore, I am trying to use the MediaLibraryExtensions library. And there is a method GetPathFromToken, which allows you to get the path to the media file. Trying to do as follows:
SongCollection songs = library.Songs; Song singleSong = songs[index]; name = singleSong.Name; path = library.GetPathFromToken(name);
But nothing comes out. If anyone knows, tell me what to pass to the parameter.