Announcing "Project EnTrance" - An Open-Source Podcast Shell for Windows Phone 8
With Nokia DVLUP and their Create competition at bay, I decided to extend my application development experience and create something that was long overdue on my "to do" list. I am a big fan of podcasts, specifically EDM podcasts. One of those is "A State of Trance", so when I started working on EnTrance, I tailored it to that. As a weekend project, it turned out quite nicely, but what I noticed is the fact that the app turned out to be to some extent universal - it can be used with any podcast with little modification.
At that, I open-sourced the project and published it on GitHub. You can download it here. Now, let's go over some internals that would let you customize it for your own podcast (or any other podcast feed, really).
I have a podcast feed. How do I put it in the app?
First of all, make sure that the feed is compatible with iTunes clients. There are extensive guidelines on how to create one available here. If the feed is ready, you will need to copy the XML feed URL in the Constants class (available in Constants.cs), as a value for the PODCAST_URL static string. At this time, the URL cannot be changed in-app, since we are assuming that the app itself is dedicated to one podcast.
I have the podcast feed in the app. What data do I get about the podcast?
All the same data that you would get from the XML feed, but in an easy-to-maintain format. First of all, there is the PodcastContainer class (located in Models/PodcastContainer.cs).
It exposes the basic elements of a podcast feed:
- Feed description.
- URL for the feed logo.
- An ObservableCollection<Podcast> that contains all available episodes.
The Podcast model (located in Models\Podcast.cs) carries all the episode metadata:
Here is the detailed breakdown:
- AudioUrl - the location of the original podcast audio file. This is at the core of the app experience, since it is later used by the OS media player.
- Duration - the duration of the specific episode. Exposed via DateTime.
- Episode - currently unused. Can be potentially used to track the number of episodes.
- FileLength - the length of the audio file in bytes.
- FileName - used by the OS to store the podcast in the application data folder. In normal conditions, you will not have the need to ever query or modify this property.
- IsDownloaded - an internal flag that tells the app whether a specific episode is already in the storage or not.
- LogoUrl - each podcast episode can have its own logo. This is the potential location for one.
- PostUrl - in case a podcast episode has an associated URL for a blog post (e.g. announcing tracks, it should be stored here. In the current EnTrance build, it is not used.
- ReleaseDate - the date when the episode became first available. Declared in the feed and not queried from other sources - it might not be valid in all cases.
- Title - the title of the specific episode.
- Tracks - a list of tracks associated with the episode.
Be aware that in a lot of cases, the logo for a podcast can be pretty big (3+ MB). If that's the case, you don't want to bind it to any UI elements, because of memory allocations and mobile data consumption.
I'm running EnTrance and getting all the episodes for my podcasts, but there is never track information. Why?
Because the Tracks property is not exposed through the core podcast feed. It is an add-on that I have implemented to delight EnTrance users. It relies on Azure Mobile Services and a secondary service that is used to keep track of what songs/tracks are used in a specific podcast episode.
The Track model (located in Models/Track.cs) is at the foundation:
Each track would obviously contain the artist name, as well as the track name itself. For convenience purposes, the Association property carries a 1-to-1 relationship with the podcast episode name, so that once a podcast is loaded, AMS is queried to get the track names that have Association equal to the name of the current episode.
This can be changed to rely on the Episode property, if necessary.
I want to integrate EnTrance with Xbox Music and Nokia Music search, so that I can buy tracks. How do I do that?
It's already built-in, so no effort is necessary from your side to make it happen. Simply have the user tap on a track and EnTrance will handle the rest.
What are the restrictions on the use of EnTrance?
There aren't any major restrictions. Simply consider this:
- You should not use the name EnTrance in the Windows Phone Store for your podcast app.
- You should add a mention in the About page that you built the app on top of EnTrance source code. A link to the project page is not obligatory but would be highly appreciated.
I found a bug or have a feature request. Where do I submit it?
The best way to get my attention to it is by posting it in the Issues section of the project page. I will respond to the request there as soon as possible.
If you have any other questions, feel free to post them in the Comments section below.