It can be seen that, embodiments of the present disclosure provide an electronic device. The electronic device is configured to perform: controlling the preset region of the display screen to display the predetermined picture, obtaining the ambient light intensity value detected by the ambient light sensor, and controlling the display screen to respond according to the ambient light intensity value. The preset region is the region facing the ambient light sensor in the display screen, and the predetermined picture is the pure color picture. With the electronic device provided in embodiments of the present disclosure, the preset region of the display screen is controlled to display the predetermined picture, such that light emitted from the preset region to into the ambient light sensor is reduced. Thus, influence of the display screen on the ambient light sensor may be reduced, and accuracy of the ambient light sensor detection may be improved.
Embodiments of the present disclosure further provide a storage medium. The storage medium has stored therein one or more computer programs. When the one or more computer programs is performed by a computer, the computer is configured to perform the above method for detecting ambient light intensity.
It should be noted that, one of ordinary skilled in the art will appreciate that all or part of the steps in various methods of the above-described embodiments can be accomplished by a computer program that instructs related hardware. The computer program may be stored in a computer readable storage medium. The storage medium may include, but is not limited to, a read only memory (ROM), a random access memory (RAM), a magnetic disk, or an optical disk.