locked
How to get the album art of a song? RRS feed

  • Question

  • Hi..

    I'm trying to create an audio player which has a listview in which selected songs get displayed. When I click on one of the songs, it is played. But the main problem is that when I click any one of the songs present in the listview, what codes should I write to retrieve the album art of the clicked song? Please provide me some suggestions urgently.

    Saturday, November 30, 2013 4:34 AM

Answers

  • Have you tried this? MusicProperties class.

    --James


    <THE CONTENT IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND, WHETHER EXPRESS OR IMPLIED>
    Thanks
    MSDN Community Support

    Please remember to "Mark as Answer" the responses that resolved your issue. It is a common way to recognize those who have helped you, and makes it easier for other visitors to find the resolution later.

    Saturday, November 30, 2013 10:50 AM
    Moderator

All replies

  • what format is the song? it is up to the file format.


    Visual C++ MVP

    Saturday, November 30, 2013 4:43 AM
  • .mp3 is the format of the song..
    Saturday, November 30, 2013 10:24 AM
  • Have you tried this? MusicProperties class.

    --James


    <THE CONTENT IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND, WHETHER EXPRESS OR IMPLIED>
    Thanks
    MSDN Community Support

    Please remember to "Mark as Answer" the responses that resolved your issue. It is a common way to recognize those who have helped you, and makes it easier for other visitors to find the resolution later.

    Saturday, November 30, 2013 10:50 AM
    Moderator
  • I'm sorry, where in the  MusicProperties class is the album art?

    I am just writing a media player myself and I desperately search for a way to retrieve the album art (cover of the album).

    I even tried to get the image from KnownFolders.MusicLibrary.GetFolderAsync("Album"), but then I always get a 

    {System.UnauthorizedAccessException: Access is denied. (Exception from HRESULT: 0x80070005 (E_ACCESSDENIED))
       at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
       at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
       at System.Runtime.CompilerServices.TaskAwaiter`1.GetResult()
       at MediaPlayerLibrary.Impl.BasicMediaDataProvider.<>c__DisplayClass10.<<GetAlbumArtAsync>b__f>d__12.MoveNext()
    --- End of stack trace from previous location where exception was thrown ---
       at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
       at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
       at System.Runtime.CompilerServices.TaskAwaiter`1.GetResult()
       at AmazingMusic.ViewModels.AlbumArtViewModel.<SyncCurrentAlbumArt>d__4.MoveNext()
    --- End of stack trace from previous location where exception was thrown ---
       at System.Runtime.CompilerServices.AsyncMethodBuilderCore.<ThrowAsync>b__3(Object state)
       at System.Threading.WinRTSynchronizationContext.Invoker.InvokeCore()}

    By the way, I am developing the app on Windows phone 8.1 (store app, not silverlight)

    Tuesday, August 26, 2014 5:59 PM