15

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 – Matthew Read Nov 4 '11 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 '11 at 0:28
3

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.

3

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

and

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

1

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

0

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.

protected by Community Aug 19 '17 at 10:59

Thank you for your interest in this question. Because it has attracted low-quality or spam answers that had to be removed, posting an answer now requires 10 reputation on this site (the association bonus does not count).

Would you like to answer one of these unanswered questions instead?

Not the answer you're looking for? Browse other questions tagged or ask your own question.