1. An electronic device, comprising: a housing; a lens protection cover, installed on the housing; an image capturing unit; a light-source sensor, configured to detect external light which comes into the electronic device through the lens protection cover; a processing unit, configured to determine whether the detected external light is less than a threshold; and a visible light source module, configured to generate visible light; wherein when the processing unit determines the detected external light is less than the threshold, the processing unit activates the visible light source module to generate the visible light and activates the image capturing unit to capture a fingerprint image of a user's finger which is put on the lens protection cover for fingerprint recognition.