views:

38

answers:

1

I want to use my iPhone to very easily create a timestamp whenever a certain event occurs (e.g. every time I cough). The goal is to build up a log file that can be analyzed later for trends.

My iPhone is passcode locked because of my Exchange policy, so the steps to do this if I were to create a conventional app are as follows:

  1. Press home buttom
  2. Slide to unlock
  3. Enter passcode
  4. (If applicable) Close whatever app is already open
  5. Navigate to my app in the home screen & launch it. When the app is launched, it records a timestamp.

This turns a very simple write-only action into a somewhat annoying task I will probably abandon, given that it may occur dozens of times a day. Is there a way around these steps?

Here's a hack I've come up with:

  1. Press the home button
  2. Press the home button and sleep/wake button simultaneously, taking a screenshot

Each time I do this, an image is created in my photo library. After a couple of weeks, I transfer the (hundreds of) pictures to my PC, and run a script to extract the timestamps from the screenshots' metadata and build the log.

Any other ways of doing this, possibly using Voice Commands, hardware buttons, log files, or something else I might not be aware of?

Edit: iPhone 3GS, iOS 4.

+1  A: 

iOS4.0? Here's one idea requiring a media player app running in the background. Make an app like Pandora, or a simpler audio player app that continually plays silence (keeps filling audio queue buffers with zeros, etc.), and that will continue to play this "music" in the background. Have it register for volume change notifications. Record a timestamp when you press one of the volume buttons (have to be careful to alternate so you don't hit the max or zero volume).

hotpaw2
You could actually use your audio output to beep at the set volume (or some other indication) so you would know if it was too low or high to change.
hotpaw2
Only thing to note is if this were to be an app store app, they'd never allow it ala Camera+. Pretty ingenious idea though, so I'd definitely go with that if just making the app for personal use.
David Liu
There is a slight chance than one might be able to get an app using this technique into the app store if the volume buttons actually controls the actual sound volume (say play a quiet ambient sound) rather than doing nothing (instead of silence, as in my original solution). Describe the app as primarily an ambient sound app (plenty of them in the app store), with optional logging of when the user required different sounds or sound levels.
hotpaw2