Saturday, 7 January 2012

Comments are Suspended

I have suspended comments on the blog because I want to encourage people to use the new forum I have set up at

Thursday, 10 March 2011


I released version 1.7.4 of Meditation Helper tonight, and was very happy with myself that I had fixed the last couple of lingering bugs. Imagine my horror when I found errors being reported, with comments like:
latest updates has messed up my samsung galaxy a keep getting errors and my favorite app does not open
Meditation Helper..don't work !
The problem was that with this release I introduced Proguard for the first time. The reason for this was that I also introduced Jodatime to help solve some problems with time zone handling. Proguard helps to shrink down the size of the application to the minimum required.

Anyway, to cut a long story short, because Proguard had changed package names, a call to getResourceAsStream() failed because the directory it was looking had been renamed. That caused a NullPointerException, which caused a force close.


The thing is, I'd been running the new version on my phone for the last couple of days, and it was all working fine. But I hadn't been running the signed version. And Proguard only runs when you export a signed version. In other words, I wasn't running the version of the app that I uploaded to the market.


Apparently it's possible to add some configuration to Proguard to handle looking up resources. But, since I wanted to get a fix out as quickly as possible. I simply removed the offending class. It provided functionality that I'd considered removing a few months ago anyway, so it was no great loss.

I can only apologize to the people that were affected by this. Hope I didn't cause you too much trauma! I have updated my release process - from now on I will always run the signed version of the application on my own phone before uploading it to the market.

Sunday, 6 March 2011

Bad Design Decisions

In the last release of Meditation Helper I made a design decision which I now regret. The app remembers the volume that was used for the last meditation session and automatically sets the volume back to that previous level. This is bad for 3 reasons:

  1. It changes the volume without letting the user know what it's doing or why.
  2. It changes the volume only after the users starts the timer. This means that if I open the app, set the volume I want, then press start, the volume might change from what I've just set.
  3. There is no option to disable this functionality.
It's ugly and horrible and I'm going to change it. Look out for a patch release going out soon to address these issues.

Sunday, 20 February 2011

Version 1.7.0 - Release Notes

  • Bell automatically reverts to the last bell volume.
  • Ability to set the day start time for the widget.
  • Backup profiles.
  • Added link to instructions.


The Timer Screen
This is the screen that you will interact with most. The assumption I made when writing Meditation Helper was that most of the usage would involve starting the app, selecting the meditation profile, meditating, then doing something else. The app is designed to be quick and easy and to use, but hides away some fairly powerful settings, should you want to tweak things.

The number in red shows the 'Preparation Time'. This is the countdown to the meditation proper starting. Use this to get comfortable on your meditation cushion and do whatever it is you need to do to mentally prepare for meditation.

The number in green shows how many minutes are left in your meditation session.

Select a Different Profile
A 'Profile' specifies the parameters of the meditation session, the details of which are outlined below. The idea is that you will set up a few profiles, then choose the one you want to use for a particular session.

There are 2 ways to load a profile. Either:
  1. Tap the name at the top of the timer screen.
  2. Use the menu button and select 'Load Profile'.

Add / Edit / Delete Profile
This is the 'Profile' editor screen. Here you can specify:
  1. The name of the profile by tapping on the top row.
  2. The preparation time.
  3. The sitting time.
  4. Interval bells that you want to ring.
Long clicking the profile name brings up a menu to load a different profile, delete the current profile, or create a new one. You can also create / load / delete profiles via the context menu (press the menu button).

Intervals are the mechanism for specifying when you want bells to ring. You can add as many intervals as you want. You can also delete intervals by long clicking on them, however, you cannot delete the top or bottom interval. These represent the bells that ring at the start and finish of the meditation.

If you don't want a bell to ring at the start or end of meditation, select the interval and set it to ring zero bells (see next section).

You can configure a meditation profile to include a number of bells. Use there to keep track of where you are in meditation, to keep you awake in case you nod off (we all do it!), or whatever other reason you want or need.

There are 2 types of bell:
  1. The start / stop bell. You can configure these to ring 0, 1, 2 or 3 times. The start bell rings at the end of the preparation time, the end bell rings at (can you guess?) - yes, that's right, the end.
  2. Interval bells. You can add as many interval bells as you want. When I meditate I ring a bell every 15 minutes to remind me to stay focussed and also to let my legs know that they are 15 minutes closer to being able to stretch out again.
As you can see from the screenshot, you can configure the bells to ring after a specific amount of time, or at regular intervals. This should be enough to cover any pattern that you want to put in place.

Note that you cannot specify when you want to ring the start / stop bells. By definition, they ring at particular points in the session.

Types of Profile
When you edit a profile you can either specify a fixed 'Sitting Time', or you can set it as open ended.

An open ended meditation is different in that it simply times how long you meditate for. It's up to you to press the stop button to indicate that you have finished meditating.

During the week, when I'm on a tight schedule to get out of the house to go to work, I use a fixed length meditation profile. At the weekend when I have a bit more time, I use an open-ended meditation, with a repeating interval bell every 15 minutes. That way I can meditate for as long as I want.


The Meditation Helper widget is my implementation of Jerry Seinfeld's productivity secret:
Years ago when Seinfeld was a new television show, Jerry Seinfeld was still a touring comic. At the time, I was hanging around clubs doing open mic nights and trying to learn the ropes. One night I was in the club where Seinfeld was working, and before he went on stage, I saw my chance. I had to ask Seinfeld if he had any tips for a young comic. What he told me was something that would benefit me a lifetime...
He said the way to be a better comic was to create better jokes and the way to create better jokes was to write every day. But his advice was better than that. He had a gem of a leverage technique he used on himself and you can use it to motivate yourself—even when you don't feel like it.
He revealed a unique calendar system he uses to pressure himself to write. Here's how it works.
He told me to get a big wall calendar that has a whole year on one page and hang it on a prominent wall. The next step was to get a big red magic marker.
He said for each day that I do my task of writing, I get to put a big red X over that day. "After a few days you'll have a chain. Just keep at it and the chain will grow longer every day. You'll like seeing that chain, especially when you get a few weeks under your belt. Your only job next is to not break the chain."
"Don't break the chain," he said again for emphasis.
The widget displays the chain of days where you have hit your meditation target.

 This is a copy of the widget from my current home screen. The top number shows the current chain, and the bottom number shows the highest chain that I have completed so far. So what this shows is that I am currently on a run of 59 days, and that is my longest run to date. The bar on the right represents the time I have meditated today, as a proportion of my daily target. I know by glancing at this that I have meditated for 50% of my target today, and if I don't do the other 50% before midnight, I will break the chain.

The daily target is set via the settings menu. From the main timer screen, hit the menu button and select 'Settings' (see the screenshot to the right). That brings up the Settings page, which has the option to set the "Target Daily Time".

Currently my "Target Daily time is set to 60 minutes. So the widget is telling me that I have meditated for at least 60 minutes for the last 59 days, and so far I have meditated for 30 minutes today.

You can hopefully begin to see why this is useful. Having this kind of reminder on the home screen of your phone can serve as a powerful motivational tool. Before I had this, I tried to meditate for 1 hour every day, and managed to do so for maybe 8 or 9 days. But then something would happen that would make it easy for me to make an excuse not to meditate. Although I might regret not having meditated for a while, I would soon forget about it. There were no real consequences to skipping meditation.

That is not the case with the widget. Now, if I skip meditation, I will break the chain and will need to start again from zero. And I really don't want to do that! I want to push on to the 100!

I really really really do not want to break that chain. Here is where my competitive nature kicks in to act as motivation. I just do not want to see this on my home screen!

As an example, for the last couple of days I have had a really heavy cold. Previously I would have used this as an excuse not to meditate. But now I don't want to break the chain, and so I sat down to meditate even despite the cold.

So that's the widget. I hope you find it as useful as I do.

Sitting Log

The Sitting Log shows you all your meditation sittings. From this screen you can also manually enter sitting times, just in case you meditated somewhere without Meditation Helper.

You access settings via the context menu on the main timer screen. Here I will describe what effect changing the various settings has, and why you might want to use them.

Meditation Settings
  • Target Daily Time - use this to specify how long you aim to meditate for every day. One of the main drivers of Meditation Helper is to help motivate you to meditate every day. This options allows you to specify how many minutes you would like to meditate every day.
  • Day Start Time - in the original versions of MH the meditation day was assumed to start at midnight. This meant that if you wanted to hit your target for the day, you had to start any meditation sittings before midnight. This was fine for me, because I go to bed early. But I received some requests from people who asked if I could make this configurable. That's what this setting is for. You can now specify the time that will be used to determine whether or not you met your target for a particular day.
  • Reminders Enabled - Meditation Helper will prompt you to meditate if you have not met your target for the day when this option is selected. A notification will appear in the notification bar.
  • Reminder Time - use this to specify what time you want to receive a reminder. I have this set to 19:15 since I like to meditate as soon as I get home from work.
  • Reminder Message - use this to specify what you want the reminder to say. Put something in here that will inspire you to meditate.
Phone Options

  • Auto Silent Mode - selecting this will put your phone into silent mode for the duration of your meditation. Use this to avoid being disturbed.
  • Auto Airplane Mode - like auto silent mode, but even more radical.
  • Stay Silent at End - originally both 'Auto Silent Mode' and 'Auto Airplane Mode' de-activated as soon as the meditation session finished. This option extends both modes until you actually exit the application. So, at the end of the meditation, you can take a few minutes to reflect before opening yourself up to phone calls, text messages, etc.
  • Keep Screen On - prevents the screen from going to sleep. Use this if you like to keep an eye on how long you have left.
  • Disable Screen Lock - if you want your screen to go to sleep, but still like to check your progress and don't want to have to use your pin or security pattern to activate the screen, enable this. The screen lock will be disable for the same period that Auto Silent / Airplane modes would be active.
Bell Options
  • Enable Faster Bells - if you ring more than one bell at a particular interval during your meditation, then you may want to do so quicker than the default. By default the entire bell rings before the next one starts (roughly 10 seconds per bell). With this option you are saying you want to have a smaller gap between bells. It simply enables the next option...
  • Gap Between Bells - how big a gap (in seconds) do you want between bells?
  • Remember Bell Volume - if this is set then the application will remember the bell volume from the previous sitting.
  • Vibrate Enabled - do you want the phone to vibrate when a bell rings?
  • Vibrate Only - rather than ring a bell, just vibrate the phone. I use this if I am away with my wife in a hotel, and want to meditate without disturbing her.
  • Bell Notifications On - do you want to receive a notification in the notification bar every time a bell rings? You are unlikely to want to use this. I added it as a feature when I was investigating a bug where bells sometimes didn't ring (now fixed).
At the bottom of the settings screen there is an option to back up profiles and sittings. It should be fairly obvious what this does - it simply writes the settings to the various files, as specified.

If you buy a new phone then this would be the way to transfer your profiles and sitting information to the new phone. Simply backup both sets of data, remove the SD card from your old phone and put it in your new phone, then restore both sets of data.

Backing up sittings also provides a way to export your sitting information. The meditation-sittings.txt file is in csv format, and can be imported into Excel.

Saturday, 15 January 2011

Version 1.6.0 - Release Notes

Version 1.6.0 includes the following changes:
  • Can now specify how many times to ring every bell. If you don't want a start bell, just set the number of times to zero.
  • The option to ring multiple end bells has been removed from the settings. You now specify this for each individual profile. If you are upgrading from an old version and you were using the setting to ring multiple bells, the new version will detect this and automatically set all your profiles to ring the end bell the correct number of times.
  • New setting to disable the screen lock. If you enable this it means that the phone won't lock while you are meditating, making it easier to switch it on and view the remaining time.
  • New setting to shorten the gap between bells. For example, if you have set the timer to ring 3 bells at the end of a meditation session, then currently the second bell won't start until the first bell has finished. In the new version, you can set "Enable Faster Bells" and then use the "Gap Between Bells" setting to specify how many seconds to delay before ringing each subsequent bell. I use this to ring 3 bells quickly at the end of the session (with a 0.5 second gap).
Version 1.6.0 does NOT contain move to SD card. Having looked into this, it will greatly complicate things if I enable this feature. Therefore I have taken the decision not to enable this functionality.

Wednesday, 5 January 2011

Version 1.6.0 Plan

My current thinking is that I will do one final release of the app to add a few features that people have requested. After that I'm declaring the app finished, and will move on to work on other projects.

The headline features that I will add to 1.6.0 are:

  • Ability to configure how many times to ring every bell.
  • Enable move to SD card.
I don't have any timescales for this. It will be done when it's done.