A helper class for Windows Phone 8 podcast apps, and apps that want to send commands to WP8 podcast apps.
PodcastWP can be installed from NuGet:
Install-Package PodcastWP
The PodcastHelper class can send commands to Launch, Play, Pause or skip to the next or previous podcast app using this method:
PodcastHelper.CommandPodcastApp(PodcastCommand.Launch);
The PodcastHelper clas can also send commands to subscribe to a Podcast rss feed:
PodcastHelper.SubscribeToPodcast(new Uri("<rss feed url>"));
If you want to subscribe to a podcast without the PodcastHelper library you can also use the URI directly:
Launcher.LaunchUriAsync(new Uri("wp-podcast://Subscribe/?feedUrl=<rss feed url>"));
The PodcastHelper will allow you to easily check a URL for the presence of a PodcastWP command.
Register for the custom URI scheme in your app's manifest file by adding this line in your manifest files tag.
<Protocol Name="wp-podcast" NavUriFragment="encodedLaunchUri=%s" TaskID="_default" />
In your UriMapper, you will have code similar to this:
if (PodcastHelper.HasPodcastUri(uri))
{
var action = PodcastHelper.RetrievePodcastAction(uri);
// Perform action in your app
return new Uri("MainPage.xaml", UriKind.Relative);
}
BringCast | Car Dash | P Cast |