Electronic device including side mounted sensor and method for controlling camera of the electronic device
An electronic device according to an embodiment of the disclosure may include: a camera; at least one processor comprising processing circuitry; at least one display; a sensor having a sensing region on a side surface of the electronic device; and a memory. The memory may store instructions, and at least one processor, individually and/or collectively, is configured to: execute a camera application for controlling the camera; based on the camera application being executed, sense a vertical swipe input through the sensor; control a first function of the camera, based on the vertical swipe input; sense a horizontal swipe input through the sensor; and control a second function of the camera, based on the horizontal swipe input.
1 . An electronic device comprising:
a camera disposed on a front surface or a rear surface of the electronic device;
at least one processor comprising processing circuitry;
at least one display disposed on the front surface of the electronic device;
memory storing instructions; and
at least one sensor having a sensing region on a side surface surrounding the front surface and the rear surface of the electronic device,
wherein the at least one sensor is formed in a shape of a protruding button and is configured to sense a touch input and a pressure input on the side surface,
wherein the instructions, when executed by the at least one processor, individually and/or collectively, cause the electronic device to:
execute a camera application for controlling the camera;
based on the camera application being executed, sense a vertical swipe input through the at least one sensor;
control a first function of the camera, based on the vertical swipe input;
sense a horizontal swipe input through the at least one sensor; and
control a second function of the camera, based on the horizontal swipe input.
2 . The electronic device of claim 1 , wherein the instructions, when executed by the at least one processor, individually and/or collectively, cause the electronic device to:
based on the input having a pressure higher than a first pressure level being sensed through the at least one sensor, control the camera to maintain focus on a subject; and
based on the input having a pressure higher than a second pressure level being sensed through the at least one sensor while maintaining a pressure higher than the first pressure level, control the camera to capture an image of the subject.
3 . The electronic device of claim 1 , further comprising an actuator configured to provide a haptic feedback in response to the vertical swipe input and/or the horizontal swipe input.
4 . The electronic device of claim 1 , wherein the sensing region comprises a top portion, a bottom portion, a front portion, and a rear portion.
5 . The electronic device of claim 4 , wherein the vertical swipe input comprises an input swiping from the top portion to the bottom portion or from the bottom portion to the top portion.
6 . The electronic device of claim 4 , wherein the horizontal swipe input comprises an input swiping from the rear portion to the front portion or from the front portion to the rear portion.
7 . The electronic device of claim 1 , wherein the instructions, when executed by the at least one processor, individually and/or collectively, cause the electronic device to control settings of the camera to be switched from an automatic image capture mode to a manual image capture mode based on the horizontal swipe input being sensed through the at least one sensor.
8 . The electronic device of claim 1 , wherein the camera comprises a first camera and a second camera, and
wherein the instructions, when executed by the at least one processor, individually and/or collectively, cause the electronic device to switch the camera such that an image acquired through the first camera is acquired through the second camera based on the vertical swipe input being sensed through the at least one sensor.
9 . The electronic device of claim 1 , wherein the instructions, when executed by the at least one processor, individually and/or collectively, cause the electronic device to control magnification of the camera based on the vertical swipe input being sensed through the at least one sensor.
10 . A method for controlling a camera of an electronic device, wherein at least one sensor has a sensing region on a side surface surrounding a front surface and a rear surface of the electronic device, wherein the at least one sensor is formed in a shape of a protruding button and is configured to sense a touch input and a pressure input on the side surface, the method comprising:
executing a camera application for controlling the camera;
based on the camera application being executed, sensing a vertical swipe input through the at least one sensor;
controlling a first function of the camera, based on the vertical swipe input;
sensing a horizontal swipe input through the at least one sensor; and
controlling a second function of the camera, based on the horizontal swipe input.
11 . The method of claim 10 , further comprising an actuator configured to provide a haptic feedback in response to the vertical swipe user input and the horizontal swipe user input.
12 . The method of claim 10 , wherein the sensing region comprises a top portion, a bottom portion, a front portion, and a rear portion.
13 . The method of claim 12 , wherein the vertical swipe input comprises an input swiping from the top portion to the bottom portion or from the bottom portion to the top portion.
14 . The method of claim 12 , wherein the horizontal swipe input comprises an input swiping from the rear portion to the front portion or from the front portion to the rear portion.
15 . The method of claim 10 , further comprising:
based on the input having a pressure higher than a first pressure level being sensed through the at least one sensor, controlling the camera to maintain focus on a subject; and
based on the input having a pressure higher than a second pressure level being sensed through the at least one sensor while maintaining a pressure higher than the first pressure level, controlling the camera so as to capture an image of the subject.
16 . The method of claim 10 , comprising controlling settings of the camera to be switched from an automatic image capture mode to a manual image capture mode based on the horizontal swipe input being sensed through the at least one sensor.
17 . The method of claim 10 , comprising switching the camera such that an image acquired through the first camera is acquired through the second camera based on the vertical swipe input being sensed through the at least one sensor.
18 . The method of claim 10 , comprising controlling magnification of the camera based on the vertical swipe input being sensed through the at least one sensor.