JAFA: Just Another Flashlight App – My First Android App

I am quite proud to present my first ever application for the Android platform. I started this little project a while ago, but then between the University and work I never really got time to get back to it. When I did finally get back to it, I hit a bit of a stumbling block with the effects that I put in – I’ll get to that a little later.

This is, as the title suggests, a simple flashlight application for your Android device. You can change the colour by long-pressing the screen and selecting the colour or by pressing the menu button and selecting the appropriate option. There are also some effects (disco and strobe at the moment) that you can get to by pressing Menu -> Effects and selecting whichever. There are many, many, of these types of apps on the Android market, yes, but this one is mine. I used it to learn how things work in Android and I have to say that I’ve learnt quite a lot.

[NOTE – Don’t read this next paragraph if you aren’t interested in the developmental work]

I had some interesting times with the effects (the aforementioned stumbling block). I couldn’t do them the way I normally would, which would be to use a Timer and let it update the background every so often, as the Timer class spawns a new thread, which can get ugly on small CPU, little RAM devices, but more importantly – I couldn’t manipulate the interface from within another thread. Eventually I found out that you can use Handlers to accomplish the same task using callbacks. Like I said – interesting.

(Some screenshots. Click the pictures to see bigger versions.)

It’s basic, it’s silly, but it taught me a lot of how things get done on Android and I hope that this is the first of many for me. If you want it, you won’t be able to find it on the Android Market yet – I can’t justify registering as a developer just yet – but you can find it in my public Dropbox folder here. Remember to allow applications from unknown sources.


  • Change the colour of the “flashlight” by either long pressing the screen or pressing Menu->Colours
  • Has some cool effects like strobe and disco
  • Strobe and disco effects can be set to happen slower or faster
  • Disco effect can be set to have more sections that change colour
  • App can be moved to SD card on devices that allow it (FroYo and above)
  • Works on all screen sizes from Android 1.6 (Donut) and above

If you have comments or suggestions for JAFA(or other potential applications) leave a comment down below (in the doobleydoo).


About HawkiesZA

This entry was posted in Android. Bookmark the permalink.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s