Andreas Rozek  

ElectricTorch - the iPhone as an (auxiliary) Pocket Lamp

iPhone showing the "ElectricTorch" start screenIt always happens in the worst possible moment: electrical power fails, it's getting dark...and you don't have a pocket lamp at hand. If you've packed your iPhone (or iPod touch), you may use this little (free) program to turn your iPhone into an auxiliary torch light - at least, until you've found a "real" pocket lamp!

The Lua source code and any other material which is provided through this page may be downloaded for all supported platforms and used freely in (commercial as well as non-commercial) projects - the software is published under the "MIT License" [3] with the additional restriction that any modifications to the author's original versions must be clearly marked in a way that the original author will never be considered as the author of these modifications!

durch Anklicken der Flagge gelangen Sie zu einer deutschen Version dieser Web-Seite
Durch Anklicken der Flagge gelangen Sie zu einer deutschen Version dieser Seite

Overview

The following topics are currently available, just click on a heading in order to move directly to the associated section:

Description - a really small "Operation Manual"

Using "ElectricTorch" is pretty simple: after tapping on the "Electric Torch" icon within the iPhone's "Home" area, you will first get the program's start screen. A few seconds later, the actual "main screen" will fade in (which is almost completely white to let as much light pass through as possible) - and your auxiliary pocket lamp will be ready for use.

While the white screen is shown, the internal "idle timer" (which dims the backlight and eventually switches the iPhone into stand-by after a certain period of inactivity) remains off. Although this feature prevents you from having to tap on the screen again and again, it also drains the battery - which is okay while you need the lamp functionaliity, and as long as you turn off the program afterwards. A small note at the lower edge of the screen reminds you of that issue.

In order to turn off "ElectricTorch", simply press the "Home" button - leaving the program will also re-activate the "idle timer" again.

Screenshots - what you will see

"ElectricTorch" consists of the following two screens only:

"ElectricTorch" start screen
Fig. 1: Start Screen
"ElectricTorch" main screen
Fig. 2: Main Screen

Requirements - what you will need to run (or build) the program

In order to run "Electric Torch", you will need

  • an iPhone running iPhone OS 2.1.1 (or newer) or
  • an appropriate iPod touch.

However, as the author himself owns an iPhone (running iPhone OS 3.1.2) only, the program has never been tested on an iPod touch yet.

In order to build the program you will need:

  • the Corona SDK [1] version 1.1 or newer (the trial version will be sufficient to run "Electric Torch" in the iPhone simulator) plus
  • an Apple Macintosh computer running Mac OS X 10.5.6 or newer;
  • a PPC Macintosh will suffice to run the iPhone simulator, but
  • in order to build the application for "real" iPhone devices, you will need an Intel Macintosh,
  • and all target devices must run iPhone OS 2.1.1, at least.

Please consult the documentation that comes with the Corona SDK to find out how to build and test the application and how to transfer it onto a target device. You should not try to submit the program to the App Store because the author already did that himself...

Downloads

The following files are available and may be freely downloaded onto your own computer:

References

[1]
Ansca Mobile | Unlock your imagination with Corona
(see http://www.anscamobile.com/)

Using the Corona SDK it is possible to develop iPhone applications in Lua rather than in Objective-C. Follow the link to find out more...

[2]
The Programming Language Lua
(see http://www.lua.org)

Lua is an extremely simple programming language which gains its expressiveness and power from the combination of a few carefully chosen "meta-mechanisms". Follow the link to learn more about this extraordinary language!

[3]
Open Source Initiative OSI - The MIT License
(see http://www.opensource.org/licenses/mit-license.php)

The MIT license (which is sometimes also called "X11 license") is an extremely simple license which basically guarantees free use of software while, at the same time, idemnifying the author from any liabilities.


http://www.Rozek.de/iPhone/ElectricTorch_en.html Last modified: 16.02.2010