Friday, April 1, 2011

Challenge: Code an Android music player in a weekend

I will start with a little background as to why I am doing this.  About a month ago I purchased a 500 GB Archos 5IT which is running 1.6.  I have quite a large music collection and I wanted to be able to listen to it all in my car so this seemed like the perfect player for me. 

"With storage sizes reaching up to 500 GB, your ARCHOS 5 internet tablet can store up to 600 movies, 290,000 songs or 5 million photos. No need to be frugal, store everything on your ARCHOS."

They advertise that it can hold 290k songs, but the first thing I discovered was that the archos music player only supported roughly 32k songs in its library.  The default 1.6 player was complete garbage as well so I begin to search for a decent music player that could support my needs. My choices were limited for 1.6 but I found one app that seemed good enough for the time being.  It was a folder based and had a good amount of customization.  Folder based navigation is great if you know exactly what you want, but it is not ideal if you are just browsing for something to listen to.  It ended up being my best option for 1.6 but I figured maybe there was something better for 2.0+

A week or so ago I got a new phone that ran 2.2 (HTC Thunderbolt) so the first thing I did was start trying out all the other 2.0+ music players out there.  I tried out maybe 10 different players and still that one for 1.6 was the best.  Some players did have some nice features, but not one had everything I wanted.  I also discovered that some of them (both free/paid) were complete garbage.  I know for a fact that I could write something better.

I've been wanting to learn the android sdk for awhile and now that I have some android devices, this is the perfect time to start.  A music player seems like a good starting project for me and I could eventually mold it into something that suits all my needs .  This week I started setting up a dev environment and went through the simple hello world tutorial.  I also started reading the docs online to get an idea what I would be working with.  I was quite impressed with the API google has provided and the other day I casually said to a friend something along the lines of "this android sdk is great.. from the looks of it I could probably hammer out a decent music player in a weekend".

So all that leads me to today.  The statement of making a music player in a weekend stuck with me and sounded like it would be a pretty good challenge for an experienced programmer like myself.  So naturally:

My plan is to track my progress on here throughout the weekend and see what I end up with sunday night.  If I fail no one will have to see this right? ha

So I sit here at roughly 4pm on friday with my autogenerated project that consists of:

public class GMMPMainActivity extends Activity {
    /** Called when the activity is first created. */
    @Override
    public void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.main);
    }
}

and looks like:


its go time