I just released an app on the Android market called the “Vocal Set Rest Workout Timer“.
A promo video I put together:
http://www.youtube.com/watch?v=jytfhtQIA84
Here is the app’s description:
“The Vocal Set Rest Workout Timer allows you to easily manage your workout with an audio and/or visual cue as the timer counts down on the screen. With this app you can decide the number of workout sets with a length in seconds, and how long you want your rest periods between to be in seconds as well. I made this app so I would try to be more consistent with my weight lifting workouts. Normally I only did short workouts without taking a break, but I think this app will help me do more now. I hope you too can benefit from the effort I put into creating this. The audio is optional, so you can disable that if you prefer. Otherwise I think it is helpful, so you don’t have to keep watching your phone’s screen as you workout. Each screen includes a simple help text and of course my apps thus far don’t require any special access like Internet or GPS, so you can feel safe using it.”
From a development standpoint I did quite a few thing I had not gotten into before.
First off would be sound. I decided to go with the SoundPool object instead of the media player. The main benefit is that I can load a bunch of audio files into a single object that I can call later on to get the sounds I need.
Second I dealt with timing. I decided on an extended class of the CountDownTimer class. It seemed like the simplest timer to deal with and it worked perfectly for what I was trying to do. The public void onTick(long millisUntilFinished) function just decremented a global time tracking variable, and I made functional decisions in the public void onFinish() function. When I needed to pause, I just canceled the active count down timer. When resuming all I needed to do was create a new object with the old saved time and functionality state variables.
Besides that most of the code was “old hat” stuff I had done before or at least done something similar. It would be nice if I could setup a template somehow to use for my new projects. Even just implementing the base code I need takes a while…
Copyright © 2006 And Later.
Scott J. Waldron
All writings, media, and software programs retain copyright.
Programming code, for the purpose of tutorial or article based samples, of less then 100 lines is considered public domain. Code greater then or equal to 100 lines is
licensed under the GNU LGPL license.