Tuesday, July 31, 2007

SharePod SDK Code Samples

I've been getting lots of questions about how to use the SharePod SDK and to provide more code samples... so thats what I'm going to do. They will be added to the SharePod SDK page and to the SDK download.

This shows how easy it is (under 10 lines including some error checking!) to get a list of tracks on your iPod:

IPod iPod = null;
try
{
IPod iPod = SharePod.GetConnectediPod();
}
catch (BaseSharePodException ex)
{
MessageBox.Show(ex.Message);
return;
}
foreach (Track track in iPod.Tracks)
{
Debug.WriteLine(String.Format("{0} - {1} - {2}",
track.Title, track.Artist, track.Album);
}

1 comment:

Samir Otiv said...

Please can you add photo support!!