Electronic device communicating with wearable device and controlling method thereof
An electronic device is provided. The electronic device includes a communication circuit for transmitting or receiving data through short-range wireless communication with an external electronic device, a memory for storing classification information for classifying at least one of a function executed by the electronic device or a control scenario including at least one operation performed by the electronic device as a connection state changes between the external electronic device and the electronic device, and a processor operatively connected to the communication circuit and the memory, and the processor may be configured to connect to the external electronic device by using the short-range wireless communication, identify the connection state with the external electronic device, identify classification information of at least one of a first function being executed by the electronic device or the external electronic device based on the connection state, and execute the control scenario based on the identified classification information.
1 . An electronic device comprising:
a communication circuit transmitting or receiving data through short-range wireless communication with an external electronic device;
memory storing:
instructions,
classification information of at least one application executed by the electronic device, and
at least one control scenario, corresponding to one or more applications among the at least one application, including at least one operation performed by the electronic device based on state of connection between the electronic device and the external electronic device; and
at least one processor operatively connected to the communication circuit and the memory,
wherein the instructions, when executed by the at least one processor individually or collectively, cause the electronic device to:
establish a connection between the electronic device and the external electronic device by using the short-range wireless communication,
identify a connection state of the established connection between the electronic device and the external electronic device,
identify classification information of a first application, of at least one of the electronic device or the external electronic device, executed by the electronic device, wherein the classification information indicates a category of the first application among at least a first category of application related to providing security regarding a user's information and a second category of application related to providing power saving regarding power consumption during application execution,
based on the identified connection state, execute, in a case that the classification information indicates the category of the first application as being the first category of application related to providing security regarding the user's information, the control scenario of a screen lock operation,
based on the identified connection state, execute, in a case that the classification information indicates the category of the first application as being the second category of application related to providing power saving regarding power consumption during application execution, the control scenario of terminating the first application being executed by the electronic device,
display a screen capable of receiving an input in which a user selects an operation from the at least one operation included in the control scenario, based on the identified connection state,
execute the operation selected based on the input,
transmit a signal for causing the external electronic device to output to a screen capable of receiving another input to the external electronic device, based on the identified connection state, and
execute one of the at least one operation based on a signal related to the another input received from the external electronic device.
2 . The electronic device of claim 1 , wherein the connection state is identified based on release of the connection being identified.
3 . The electronic device of claim 1 , wherein the connection state is identified based on a strength of a signal received through the short-range wireless communication being identified as less than a threshold value.
4 . The electronic device of claim 1 ,
wherein the instructions, when executed by the at least one processor individually or collectively, further cause the electronic device to:
identify a distance between the electronic device and the external electronic device based on a strength of a signal received through the short-range wireless communication, and
wherein the connection state is identified based on the identified distance being greater than a threshold value.
5 . The electronic device of claim 1 , further comprising:
a display,
wherein the control scenario further comprises at least one of an operation of a screen saver operation, or a power saving operation.
6 . The electronic device of claim 5 , wherein the instructions, when executed by the at least one processor individually or collectively, further cause the electronic device to:
change at least one of a brightness of the display, a resolution of the display, or a data processing throughput when the power saving operation is executed.
7 . The electronic device of claim 5 , wherein the instructions, when executed by the at least one processor individually or collectively, further cause the electronic device to:
visually display information about the first application being executed by the electronic device through the display,
display a predetermined video image through the display when the screen saver operation is executed, and
re-display information about the first application being executed by the electronic device when an input is received.
8 . The electronic device of claim 1 , wherein the instructions, when executed by the at least one processor individually or collectively, further cause the electronic device to:
identify function-related information related to a second application of the electronic device,
generate classification information on the second application based on the identified function-related information, and
generate a control scenario corresponding to the second application based on the generated classification information.
9 . The electronic device of claim 8 , wherein the instructions, when executed by the at least one processor individually or collectively, further cause the electronic device to:
receive a user input for whether to approve the generated control scenario, and
store the generated control scenario in the memory based on the user input.
10 . The electronic device of claim 8 , wherein the function-related information comprises at least one of a request authority of the second application, a keyword related to the second application, or a classification tag related to the second application.
11 . A method performed by an electronic device to execute a control scenario including at least one operation, the method comprising:
establishing a connection between the electronic device and an external electronic device by using a short-range wireless communication;
identifying a connection state of the established connection between the electronic device and the external electronic device;
identifying classification information of a first application, of at least one of the electronic device or the external electronic device, executed by the electronic device, wherein the classification information indicates a category of the first application among at least a first category of application related to providing security regarding a user's information and a second category of application related to providing power saving regarding power consumption during application execution,
based on the identified connection state, executing, in a case that the classification information indicates the category of the first application as being the first category of application related to providing security regarding the user's information, the control scenario of a screen lock operation;
based on the identified connection state, executing, in a case that the classification information indicates the category of the first application as being the second category of application related to providing power saving regarding power consumption during application execution, the control scenario of terminating the first application being executed by the electronic device;
displaying a screen capable of receiving an input in which a user selects an operation from the at least one operation included in the control scenario, based on the identified connection state;
executing the operation selected based on the input;
transmitting a signal for causing the external electronic device to output to a screen capable of receiving another input to the external electronic device, based on the identified connection state; and
executing one of the at least one operation based on a signal related to the another input received from the external electronic device.
12 . The method of claim 11 , wherein the connection state is identified based on one of release of the connection being identified or a strength of a signal received through the short-range wireless communication being identified as less than a threshold value.
13 . The method of claim 11 , wherein the control scenario comprises at least one of an operation of a screen saver operation, or a power saving operation.
14 . The method of claim 11 , further comprising:
identifying function-related information related to a second application of the electronic device;
generating classification information on the second application based on the identified function-related information; and
generating a control scenario corresponding to the second application based on the generated classification information.