My Droid Bionic has an option on the Display Settings page "In-Pocket detection: locks your device automatically when inserted in pocket"

How does the phone sense that it's in your pocket? I'm speculating maybe a combination of proximity and light sensors?

  • 1
    I think you've answered the question :P Nov 4, 2011 at 15:50
  • 1
    @MatthewRead - thanks; was hoping to find a source of some sort. A google search finds a lot of speculation (including one that states the phone must also be in portrait mode and vertical) and a lot of complaints that it's not reliable.
    – TomG
    Nov 5, 2011 at 0:28

4 Answers 4


There is an infrared/red-light sensor near your camera that detects whether the phone is in a pocket or bag. Online consensus is that depending on your phone manufacturer, there are varying degrees of success to how well it works.


I looked through the Play Store where i found PocketSensor which says in its description

PocketSensor uses your phone's built-in proximity sensor to automatically lock the phone when it is put in a pocket.

Example: If you want the sensor to trigger only when the device is being held straight upright (for front pockets) or pointing downwards (for pants pockets), select the "Disable in Landscape" options including all of its three suboptions.

so i guess it is definetly possible to use a combination of:

The orientation sensor lets you monitor the position of a device relative to the earth's frame of reference (specifically, magnetic north).


The proximity sensor lets you determine how far away an object is from a device.


I only can speculate about the answer how the Droid Bionic actually implements this "in-pocket detection". Most Androids that have a light sensor, (which sometimes acts also simple proximity sensor) use this as sign that you either doing a call without a headset or that you have put your device into the pocket.

It is also imaginable that Android uses the information from the 3-axis accelerometer and/or the 3-axis gyroscope to detect in-pocket situations. But I don't think that this is actually done, because these sensors use quite a amount of power when in use.

For an example datasheet of an Android Light/Proxmity Sensor, see the SFH 7743 from the Motorola Droid. It detects IR-light around 900nm. It seems that some Androids have separated light and proximity sensors, while others abuse the light-sensor as simple proximity sensor (e.g. Samsung Galaxy S).


In this scientific paper they've used proximity and light sensors. They describe the core algorithm, which is not so complicated, and they have developed it for Tizen. The Android framework provide an equivalent sensor api, though I have not tried it myself.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .