Your phone is resting on the table; you pick it up, and it flicks on. You didn't press anything -- it just knows. Or maybe it's in your pocket or your purse -- you pull it out, and the screen turns on. It feels magical, and it works well, thanks to a free little app called Gravity Screen. The screen knows when to turn off, too.

The Magic of Sensors

Your phone is a tightly packaged bundle of sensors. It has a proximity sensor so it knows to turn the screen off when you're in a call; it has a gravity sensor, so it knows which way you're holding it; there's also a gyroscope and a compass and a slew of other sensors. Turns out these can be used to figure out when the phone is resting on the table, when it's in your pocket, and when it's in your hand. It's simple, and it doesn't require much battery power.

gravityscreen-1

Pocket Sensor

gravityscreen-4

First things first: This simple setting makes sure the phone turns off as soon as you stick it in your pocket. Once it realizes it's at that angle, and the proximity sensor is covered, Gravity Screen surmises it's probably in a pocket - and shuts off the screen. You can also have it disregard the proximity sensor and rely just on the gravity sensor if you want (not that I know why you would).

Table Sensor

gravityscreen-5

Next up is the magical table sensor: Switch it on, and as soon as the phone realizes it's lying statically on a flat, horizontal surface, the screen will turn off. You can decide whether you want it to turn off when it's lying face up, or only when it's face down.

Turning The Screen Back On

gravityscreen-6

Two ways to do this: The simplest one is using the proximity sensor. As soon as the phone detects stuff moving next to it, it switches on. In other words, even if it's lying face-up on the table, turned off -- you can just wave your hand over it and it will turn itself on.

The second way uses the motion sensor: Just pick up the phone and move it, and the screen switches on. This is neat, but it also means the phone needs to stay awake to monitor for motion, causing some battery drain. The app lets you set a timeout for this behavior, so that after a few minutes with no motion, the phone really does go to sleep. Once it's sleeping, you'll have to turn it on by pressing the power button, or by waving over the proximity sensor while saying "Lumos." Okay, you don't really have to say it... You still should though.

Keeping The Screen On

Once again, there are two ways you can keep the screen on: Let's say the phone is lying face up on a table, and you're watching something but the phone keeps turning off. No problem: Just hold your hand over the proximity sensor for a moment, and the screen will not turn off for one minute. Hold your hand over the sensor again to keep the screen on for five minutes.

Then there's keeping the screen from turning off when you're holding it in your hand (when reading a webpage, for example):

gravityscreen-7

The previously-reviewed Samsung Galaxy S4 does this using fancy optical recognition, to tell when you're looking at the screen. Turns out there's a simpler way: Just monitor the phone's sensors. Nobody can hold a phone super-still, even when they're just reading. By monitoring for minute movements, Gravity Screen knows to keep the screen on when you're using the phone. Needless to say, you can (and should) adjust the sensitivity so it works well for you.

Some Testing Required

gravityscreen-2

All of these settings can be toggled and/or tweaked for your liking. Gravity Screen works out of the box, but you can probably make it work better for you with just a little trial and error.

One issue to watch for is alarms: Let's say your phone is lying face down on your bedside table, and the alarm goes off in the morning. Because it is face down, Gravity Screen will immediately turn the screen off again -- and this may turn your alarm off, too (depending on your alarm clock).

The solution is to find an alarm clock that doesn't do this, or to leave your phone lying face up at night. Here's a round-up of alternative alarm clocks in case you want to check some out. Be sure to test the alarm ahead of time.

Easy to Disable and Enable

gravityscreen-3

Finally, if Gravity Screen ever gets on your nerves, you can disable it with a single tap on its persistent notification - and enable it again, too.

It Works, and It's Awesome

The free version of Gravity Screen rocks, and it changed the way I use my phone. It did require some adjustments (and I switched to a different alarm clock, AlarmPad [No longer available]), but when I got it to work, it worked very well. It doesn't do as many things as Tasker, but sometimes focus is good, especially for a mobile app.

Give it a try, and let me know your thoughts in the comments.