Electronic device and method for displaying connection state in virtual environment
A wearable device comprises a display, a communication circuit, at least one processor, and memory storing instructions. The instructions, when executed by the at least one processor, cause the wearable device to: establish a first connection with a first external electronic device of the plurality of external electronic devices by using the communication circuit; identify a second external electronic device of the plurality of external electronic devices within a field of view of the wearable device; display, through the display, a first visual object representing the first connection, based on identifying an event associated with the first connection; and based on an input obtained for the first visual object for establishing a second connection between the first external electronic device and a second external electronic device, cease displaying of the first visual object and display, through the display, a second visual object representing the second connection.
1 . A wearable device comprising:
a display;
a camera;
communication circuitry;
at least one processor comprising processing circuitry; and
memory, comprising one or more storage mediums, storing instructions,
wherein the instructions, when executed by the at least one processor individually or collectively, cause the wearable device to:
identify a plurality of external electronic devices including a first external electronic device and a second external electronic device, using the communication circuitry;
establish a first connection between the wearable device and the first external electronic device, using the communication circuitry;
obtain an image through the camera;
based on the first connection, display, through the display, a user interface (UI) object superimposed on the image obtained through the camera for indicating that the first connection is established between the wearable device and the first external electronic device, wherein the UI object is visually connected with a first visual object representing of the first external electronic device included in the image;
obtain an input for moving the UI object for changing a connection device of the first external electronic device; and
based on movement of the UI object caused by the input being identified as visually connecting the first visual object representing the first external electronic device and a second visual object representing the second external electronic device, transmit signals to the first external electronic device and the second external electronic device for a second connection between the first external electronic device and the second external electronic device.
2 . The wearable device of claim 1 , wherein the instructions, when executed by the at least one processor individually or collectively, further cause the wearable device to:
transmit, to each of the plurality of external electronic devices, a connection signal;
receive, from the first external electronic device, a response signal of the connection signal; and
establish the first connection, based on the response signal of the connection signal.
3 . The wearable device of claim 2 , wherein the connection signal comprises at least one of identification information of the wearable device, account information of a user of the wearable device, connection state information of the wearable device, connection history information of the wearable device, or transmission strength information of the connection signal, and
wherein the response signal comprises at least one of identification information of the first external electronic device, account information of a user of the first external electronic device, connection state information of the first external electronic device, connection history information of the first external electronic device, or transmission strength information of the response signal of the connection signal.
4 . The wearable device of claim 1 , wherein the plurality of external electronic devices comprises at least one of:
an electronic device having account information that is the same as account information of the wearable device, or
an electronic device in which a distance from the wearable device is within a specified distance.
5 . The wearable device of claim 1 , wherein the instructions, when executed by the at least one processor individually or collectively, cause the wearable device to, based on identifying an event associated with the first connection, display the UI object indicating the first connection between the wearable device and the first external electronic device, and
wherein the event associated with the first connection comprises at least one of:
receiving an input with respect to a visual object used for establishing the first connection between the wearable device and the first external electronic device,
receiving, from a third external electronic device connected to the wearable device, information confirming whether connection to the first external electronic device or the wearable device is available,
an execution of a function for performing multiple connections, or
an input for changing a state of the first connection.
6 . The wearable device of claim 5 , wherein the UI object indicating the first connection is displayed within a designated time length from a timing at which the event is identified or while movement of a user of the wearable device is within a designated range.
7 . The wearable device of claim 1 , wherein the UI object indicating the first connection is extended from the first external electronic device to the wearable device, in case that the first external electronic device is positioned within a field of view (FoV) of the wearable device, and
wherein the UI object indicating the first connection is extended from an area corresponding to a position of the first external electronic device within the FoV to the wearable device, in case that the first external electronic device is positioned outside the FoV.
8 . The wearable device of claim 1 , wherein the instructions, when executed by the at least one processor individually or collectively, further cause the wearable device to:
transmit, to the first external electronic device, a capability information inquiry message for requesting information on an electronic device to which the first external electronic device is connectable; and
receive, from the first external electronic device in response to the capability information inquiry message, a capability information message indicating one or more electronic devices connectable by the first external electronic device including the second external electronic device.
9 . The wearable device of claim 8 , wherein the instructions, when executed by the at least one processor individually or collectively, further cause the wearable device to:
identify an event associated with the first connection; and
based on the identifying the event associated with the first connection, display an indicator together with the first visual object, and
wherein the indicator indicates that, based on the capability information message, the second connection between the first external electronic device and the second external electronic device identified is available.
10 . The wearable device of claim 1 , wherein the signals transmitted to the first external electronic device and the second external electronic device comprise:
a first request signal, transmitted to the first external electronic device, for requesting an establishment of the second connection with the second external electronic device, and
a second request signal, transmitted to the second external electronic device, for requesting the establishment of the second connection with the first external electronic device, and
wherein the instructions, when executed by the at least one processor individually or collectively, further cause the wearable device to:
based on receiving a first response signal of the first request signal and a second response signal of the second request signal indicating that the second connection is established, release the first connection with the first external electronic device.
11 . The wearable device of claim 1 , wherein the instructions, when executed by the at least one processor individually or collectively, cause the wearable device to:
in a case that a first user input directed from the first visual object to the second visual object is received on the image, transmit, to the first external electronic device and the second external electronic device, a first command for causing the first external electronic device and the second external electronic device to perform a first function for interaction between the first external electronic device and the second external electronic device; and
in a case that a second user input directed from the second visual object to the first visual object is received on the image, transmit, to the first external electronic device and the second external electronic device, a second command for causing the first external electronic device and the second external electronic device to perform a second function for the interaction between the first external electronic device and the second external electronic device.
12 . The wearable device of claim 1 , wherein the instructions, when executed by the at least one processor individually or collectively, further cause the wearable device to:
based on identifying an event associated with the first connection, display, through the display, a second UI object visually connecting the first visual object representing the first external electronic device and a third visual object representing a third external electronic device included in the image, and
wherein the second UI object indicates a third connection established between the first external electronic device and the third external electronic device.
13 . The wearable device of claim 12 , wherein the instructions, when executed by the at least one processor individually or collectively, further cause the wearable device to:
based on another user input obtained with respect to the second UI object for breaking a visual connection between the first visual object and the third visual object, transmit, to the first external electronic device and the third external electronic device, other signals for a disconnection of the third connection;
receive, from the first external electronic device or the third external electronic device, other response signals indicating that the third connection is disconnected; and
based on receiving the other response signals, remove the third visual object from the image.
14 . A method performed by a wearable device, the method comprising:
identifying a plurality of external electronic devices including a first external electronic device and a second external electronic device;
establishing a first connection between the wearable device and the first external electronic device;
obtaining an image through a camera;
based on the first connection, displaying a user interface (UI) object superimposed on the image obtained through the camera for indicating that the first connection is established between the wearable device and the first external electronic device, wherein the UI object is visually connected with a first visual object representing the first external electronic device included in the image;
obtaining an input for moving the UI object for changing a connection device of the first external electronic device;
based on movement of the UI object caused by the input being identified as visually connecting the first visual object representing the first external electronic device and a second visual object representing the second external electronic device, transmitting signals to the first external electronic device and the second external electronic device for a second connection between the first external electronic device and the second external electronic device.
15 . The method of claim 14 , the method comprising:
transmitting, to each of the plurality of external electronic devices, a connection signal;
receiving, from the first external electronic device, a response signal of the connection signal; and
establishing the first connection, based on the response signal of the connection signal.
16 . The method of claim 15 , wherein the connection signal comprises at least one of identification information of the wearable device, account information of a user of the wearable device, connection state information of the wearable device, connection history information of the wearable device, or transmission strength information of the connection signal, and
wherein the response signal comprises at least one of identification information of the first external electronic device, account information of a user of the first external electronic device, connection state information of the first external electronic device, connection history information of the first external electronic device, or transmission strength information of the response signal.
17 . The method of claim 14 , wherein the plurality of external electronic devices comprises at least one of:
an electronic device having account information that is the same as account information of the wearable device, or
an electronic device in which a distance from the wearable device is within a specified distance.
18 . The method of claim 14 , further comprising:
based on identifying an event associated with the first connection, displaying the UI object indicating the first connection between the wearable device and the first external electronic device,
wherein the event associated with the first connection comprises at least one of:
receiving an input with respect to a visual object used for establishing the first connection between the wearable device and the first external electronic device,
receiving, from a third external electronic device connected to the wearable device, information confirming whether connection to the first external electronic device or the wearable device is available,
an execution of a function for performing multiple connections, or
an input for changing a state of the first connection.
19 . A non-transitory computer-readable storage medium storing one or more programs including instructions that, when individually or collectively executed by at least one processor of a wearable device comprising a display, a camera, and communication circuitry, the wearable device to:
identify a plurality of external electronic devices including a first external electronic device and a second external electronic device, using the communication circuitry;
establish a first connection between the wearable device and the first external electronic device, using the communication circuitry;
obtain an image through the camera;
based on the first connection, display, through the display, a user interface (UI) object superimposed on the image obtained through the camera for indicating that the first connection is established between the wearable device and the first external electronic device, wherein the UI object is visually connected with a first visual object representing the first external electronic device included in the image;
obtain an input for moving the UI object for changing a connection device of the first external electronic device; and
based on movement of the UI object caused by the input being identified as visually connecting the first visual object representing the first external electronic device and a second visual object representing electronic device to the second external electronic device, transmit signals to the first external electronic device and the second external electronic device for a second connection between the first external electronic device and the second external electronic device.
20 . The non-transitory computer-readable storage medium of claim 19 , wherein the instructions, when individually or collectively executed by the at least one processor, cause the wearable device to:
transmit, to each of the plurality of external electronic devices, a connection signal;
receive, from the first external electronic device, a response signal of the connection signal; and
establish the first connection, based on the response signal of the connection signal.