A method for switching cameras is disclosed. The method for switching cameras is used in an electronic device. The electronic device includes a first camera disposed at a first surface of the electronic device and a second camera disposed at a second surface of the electronic device different from the first surface. The method for switching cameras includes the following steps. Whether the first camera is covered is sensed when the first camera captures. When the first camera is covered, the first camera is disabled and the second camera is used to photograph.