Friday, December 2, 2011


My second Windows Phone 7 application, TeaMate, has been certified and published in the Windows Phone Marketplace.

TeaMate is a simple tea timer to help you brew the perfect cup of tea.

- Set a brew time from 1 to 10 minutes

- App displays a message and plays an alarm to let you know your tea is done

- Alarm plays even under the lock screen or when the screen times out
One challenge with timer applications in Windows Phone 7 is that when the phone does into Idle mode, that is, when the screen goes off automatically or when the user hits the power button to turn the screen off, your application is no longer active and running. This means something simple as a timer stops running. So how does the timer continue to function and set the alarm off when the time is up?

To workaround this issue, TeaMate also creates an alarm and registers it with the Phone. That way, even if the screen is off and the app is not active, the timer will still go off as expected. Now, if the app remains active, just before the alarm goes off, I unregister the alarm from the Phone. That way, the app can alert the user when the timer has expired and not have the Phone's alarm reminder go off as well.

This ingenius little trick allows the alarm to work even when the phone is Idle and the screen is off and it plays well in the Windows Phone ecosystem by not running in the background and consuming battery life.

In case you were wondering, the logo, or asian character you see in the TeaMate is the Chinese word for tea.

No comments:

Post a Comment