Patent ID: 8288027

Claim:
An electronic device capable of being powered by a battery, the electronic device comprising: a main body defining a cavity for receiving the battery, the main body comprising a sidewall defining an opening communicating with the cavity, the sidewall further defining a through hole adjacent to the opening; a control switch engaged in the through hole and rotatable with respect to the sidewall, the control switch comprising a protruding portion and a magnetic portion; and a sliding block movable in the main body, wherein at least a part of the sliding block is made of magnetic material; wherein when the battery is installed in the cavity through the opening, the control switch is rotated to a first position, such that the protruding portion presses against the sliding block and pushes a part of the sliding block into the cavity to block the battery therein, and the magnetic portion attracts the sliding block out of the cavity when the control switch is rotated to a second position at which point the magnetic portion faces the sliding block.