Yes, I have gotten back into programming. As usual the reason is that I have searched for something I want but couldn’t find anything satisfying.

While I’m not much of a programmer, the only languages I can consider myself fluent in are PHP and Bash scripting, I do occasionally like to fire up an IDE in order to solve a problem. And with modern programming languages being so similar it doesn’t really matter if I’m writing a Bash script or use PHP, C, C# or Java. Usually the main difference is the vocabulary.

This time I’m having another go at Java as I am writing an application for my Android phone.

When I go to sleep I sometimes like to listen to AudioBooks. Since I don’t want to have the player run all night, but preferably have it stop when I’m asleep I was looking for applications that offer a timeout feature.

The application I found, Audiobook Player 2, is pretty good, but lacks one function.
I really like how I can set a timeout after which the application will expect me to shake my phone to show I’m still awake. But once I fall asleep I inevitably miss a few minutes until the next timeout hits and stops the playback. The problem here is that when I want to continue listening I have to find a point where I have still been awake in order to not miss out on anything.

This is the reason why I fired up Eclipse and started StoryTeller. I want the rewinding done automatically.
Now, after a couple of days of writing and rewriting a couple of hundred lines of code my application finally starts being useful. It recursively scans /mnt/sdcard/music for audio files. These files are then grouped into books and the books are displayed as a simple list. Clicking on this one of the entries results in the media player component to be started, which starts a background service that handles the playback. While I have already implemented the timeout I still have to test the settings of my shake detection, as thus far I have mostly been working on virtual devices.

Of course there still is work to be done, for example right now the attempt to load the next audio file of a book results in a crash. The UI still needs some work and I want to enable users to specify another directory than the currently hard coded /mnt/sdcard/music.

Yet I am confident that soon enough I will be able to get my application to a state where all the function I want are available and working as expected. It is likely that a lot will still change in the background, and sometimes this may break stuff, but I will try not to commit any broken builds to SVN, so that anybody who may be interested in compiling and trying my application should be able to just get the latest revision and give it a try.

As I think that enough of the necessary functions are working as expected I will give my application a first actual try right now.

Thank you and good night!
Dennis Wronka