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:
- Press home buttom
- Slide to unlock
- Enter passcode
- (If applicable) Close whatever app is already open
- 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开发者_如何学JAVA 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:
- Press the home button
- 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.
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).
精彩评论