Monday, July 22, 2013

SoundSleep source code

A while ago, I had developed an application to continuously play music on my phone.  The program is called Sound Sleep and is available for free on the Android store. I use this application every night to play sleep-time music for my child.

I have now put the source code to Sound Sleep online. The entire Android source code for Sound Sleep is available at Github under the Apache License version 2.

To clone the entire repository:
$ git clone https://github.com/youngelf/sound-sleep.git

This source is great for learning how to program with Android. It demonstrates:
  1. Running on a wide variety of Android devices.  The minimum SDK version is 3, and I use this on an ancient phone with Android 1.6
  2. Using SD card storage to read music
  3. Setting up a new service and communicating with it using Local Broadcasts
  4. Playing music from Android applications

I'm happy to accept patches and suggestions. I have used it daily since March, and it has been rock solid and indispensable.  It has exactly the feature-set I need. Here is a screenshot of the application.  There are two controls: the top half plays music randomly from SDCARD/music/sleeping. The bottom half plays white noise.