开发者

Can I record a timestamp on my iPhone without going through the lock screen?

开发者 https://www.devze.com 2023-01-14 11:03 出处:网络
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.

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开发者_如何学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:

  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.


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).

0

精彩评论

暂无评论...
验证码 换一张
取 消