摘要 |
Embodiments of the present invention provide a method and an apparatus for a terminal to determine approach of an object, and relate to the field of communications, where the method includes: reading, by an infrared receiver, a first infrared intensity value when an infrared emitting diode does not work, and reading, by the infrared receiver, a second infrared intensity value when the infrared emitting diode works; obtaining a first difference value between the second infrared intensity value and the first infrared intensity value as an intensity value of a reflected infrared ray; determining whether a second difference value between the intensity value of the reflected infrared ray and an infrared intensity threshold that is stored by the terminal itself is greater than a preset second threshold; and when the second difference value is greater than the preset second threshold value, determining that there is the object approaching the terminal. The apparatus includes: an infrared receiver, an obtaining module, a judging module, and a first determining module. The present invention enables each terminal to accurately determine whether there is an object approaching. |