How do you access podcasts in WP7?
How can you access the list of podcasts on the phone a开发者_运维百科nd play them in WP7?
Thanks
Currently there is no way you can query podcasts. The Genre won't tell you whether the content you are working with is a podcast or not - MediaLibrary will access the regular songs only and not additional content.
Hopefully the Mango update will carry some extensions for the Media Access API.
I was exploring the net to develop a sample for you. After BINGing for a while, suddenly I found this page which has the sample code readily available.
Windows Phone Starter Kit for Podcasts
I hope this helps :)
Not sure if there is a specific way to grab just podcasts, but if you know the title of the podcast you could use the Genre property of the Song class and then just iterate through the songs returned by the MediaLibrary
MediaLibrary library = new MediaLibrary();
SongCollection songs = library.Songs;
精彩评论