I present you my first Android app: Fake Dawn.
Fake Dawn is an alarm that gradually increases brightness and sound volume to lead you out of deep sleep and wake you up gently. There’s plenty of medical research indicating that our sleep rhythm is influenced by light. Usually we are impacting negatively our sleep pattern using bright light in the evenings or even leaving electronic screens on while we sleep. But we can use this mechanism to help alleviate one of the most difficult moments of the entire day, and the crucial one to start the day in a bright mood: waking up.
Have you ever slept a sufficient amount of hours, but wake up groggy and tired? That’s probably because you woke up during a phase of deep sleep. Ambient light (particularly blue light, it seems) can push the body from a state of deep sleep towards being awake. If you could have a light that turns on something like half an hour before your loud alarm goes off, you could bring yourself in a state that is optimal for waking up. Fake Dawn lets you do just this: you can brighten your room gradually in the morning, and then you can play a sound alarm, gently waking you up.
You can choose the behavior of brightness and sound independently. There are 4 moments to choose:
- when the brightness starts to rise
- when the brightness reaches its maximum
- when the sound starts to play at minimum volume
- when the sound reaches maximum volume
I implemented the choosing of these four moments with a custom control: it’s a slider with two “pins” to move with your finger. Each pin represents a moment, and the colored bar visualizes the minimum and maximum of effect.
There are two independent sliders: one for the brightness and one for the sound. The brightness slider is the same color as the screen when the alarm goes off.
There’s also the option of adding vibration to the alarm, and the possibility to choose the days of the week when the alarm goes off.
I wanted to make sure the preferences shows intuitively the behavior of the alarm, and I think I did at least something original.
Fake Dawn is Free Open Source Software, I distribute it under GPL3 so that programmers who wants to develop an open source app can take code from mine. The code repository is both at Google Code and GitHub.
You are invited to install it, try it and review it. Be aware that this is my first attempt at an Android app so there might be problems, especially related to the display of the controls on screen, but I use it on my Galaxy S since May and it never fails to wake me up.

Entries
anis
2012/08/21
Hi Balau
Thanks for all great posts! They help me to know more about embedded world as I’m a Linux developper in STMicro.
By this mail, I want to ask you what I need to start developping an Android app like your “fake dawn” :
- Linux Environment : ubuntu….
- If you have used android emulators for this app.
- Android tools : compiler, optimizer…
- How do you debug/test/see results for “Fake Dawn”.
- Git tools
Regards,
Anis
Balau
2012/08/21
- I’m using Debian (testing with XFCE desktop)
- I use both the emulator in Android SDK (for different versions of Android) and my Samsung Galaxy S with USB Debugging enabled (for quick test on real product).
- Eclipse + ADT, simply following the guide here: http://developer.android.com/tools/index.html . The only suggestion I have is to install Eclipse somewhere under your home directory, where your user has rights to write, because otherwise I had problem with updates.
- Up to now I have a small set of manual tests that I personally do on the device and the emulator for some version of Android. I intend to extend this and create a test project and automatically run as much tests as possible.
- git command line and git-cola as a GUI, with GitHub and Google Code as host servers
Hope this helps.