A method for determining a movement trajectory, applicable to an electronic device comprising a body, a light-emitting component, a photosensitive component, a light-emitting control component, and a processor, wherein the light-emitting component, the photosensitive component, the light-emitting control component, and the processor are all disposed in the body, the photosensitive component is connected to the processor, and the light-emitting control component is connected to the light-emitting component, the method comprising:
- emitting probe light by the light-emitting component;
- acquiring optical information about reflected light of the probe light by the photosensitive component in response to receiving the reflected light;
- and
- determining a movement trajectory of the light-emitting component by the processor based on the optical information;
- and
- the method further comprising:
- controlling the light-emitting component to emit the probe light by the light-emitting control component, wherein the light-emitting control component comprises a pressure sensor disposed in a pressure sensing region on the body, the pressure sensor being configured to control the light-emitting component to emit the probe light in response to a pressure on the pressure sensing region being greater than a pressure threshold.