How does a smartphone know if it’s in your pocket? Here’s the explanation

Putting your smartphone in and out of your pocket is a gesture that we perform dozens, if not hundreds, of times a day. Whenever we do this, especially if we use an Android smartphone equipped with the so-called “pocket mode”, we trigger a series of hardware and software procedures that ensure that the display does not respond to accidental touches that could initiate unwanted calls (or other functions). Depending on the device you own, the infrared proximity sensor, the ambient light sensor and, in many cases, the accelerometer or gyroscope, allow you to put the phone back in its place without worrying too much. The proximity sensor, usually located in the upper frame near the front camera, emits an invisible beam of light which, bouncing against the fabric of the pocket, signals the presence of an immediate obstacle. At the same time, the brightness sensor detects a drastic drop in light, often falling below minimum thresholds of a few lux, confirming that the device is in a dark environment.

The occurrence of these conditions (a close obstacle and reduced ambient light) triggers the “pocket mode” available on many smartphones. But what is it for? This feature not only prevents inadvertent touches, but plays a crucial role in energy saving, preventing the most energy-intensive component of the smartphone (the screen) from being activated inadvertently.

How the “pocket mode” of smartphones works

The operation of the “pocket mode” is based on the activation of the proximity sensor. This component emits an infrared (IR) pulse, an electromagnetic radiation not visible to the human eye; when the phone is placed in the pocket, the fabric acts as a reflective surface sending the signal back to the sensor. The device interprets this immediate return as the presence of an object “near” or in contact, a necessary but sometimes not sufficient condition. To avoid so-called “false positives” (as could happen if you cover the sensor with a finger while using the phone) the software crosses this data with that of the brightness sensor.

When we put our cell phone in a trouser pocket or a bag, we create an environment of darkness. Brightness sensors measure the intensity of light in “lux” (the unit of measurement for illuminance); manuals from manufacturers such as Samsung indicate that a reading of less than 10 lux, combined with the activation of the proximity sensor, represents a sort of unambiguous signature that the device has been put away and is not being used by the user. At this point, a further control also intervenes (in some smartphone models), which involves the accelerometer and the gyroscope. These tools, capable of detecting the movement and orientation of the device in space, recognize the typical movements that are made when placing an object in a pocket or bag, making the activation of “pocket mode” more precise.

From what has just been said, it is clear that different manufacturers apply these measurements with slight software differences but, ultimately, the result is almost always the same: the smartphone screen does not activate accidentally.

How to activate “pocket mode” on your Android smartphone

To activate “pocket mode” on your smartphone, just follow the instructions below. Although the steps are essentially more or less the same for everyone, they vary based on the software customizations of each Android smartphone manufacturer.

Samsung

  1. Launch the Settings app.
  2. Reach the Display > Accidental Touch Protection section.
  3. Move the appropriate switch to ON.

Xiaomi

  1. Open the Settings application.
  2. Go to Lock screen > Pocket mode.
  3. Set the appropriate switch to ON.

Huawei

  1. Open the Settings app.
  2. Go to Accessibility > Accidental Touch Prevention.
  3. Move the switch next to Touch Off Mode to ON.