An electronic device comprising: a communication interface, a display capable of being folded such that a first portion of the display is exposed in a first direction and a second portion of the display is exposed in a second direction opposite to the first direction, and a processor operatively coupled with the communication interface and the display, wherein the processor is configured to: identify that the electronic device is plugged into an external electronic device which is capable to mount on a head of a first user, by detecting a signal indicating a presence of the external electronic device, in a folded state, in response to identifying, receive, in a state where the first portion of the display is exposed in the first direction and the second portion of the display is exposed in the second direction opposite to the first direction, at least one message including first information regarding the first user and second information regarding an external environment comprising a second user from the external electronic device, wherein the first information is obtained by using a first sensor of the external electronic device, and the second information is obtained by using a second sensor of the external electronic device, and in response to the receiving at least one message, display, based on the first information and the second information, a first interface in the first portion of the display and a second interface in the second portion of the display. a communication interface, a display capable of being folded such that a first portion of the display is exposed in a first direction and a second portion of the display is exposed in a second direction opposite to the first direction, and a processor operatively coupled with the communication interface and the display, wherein the processor is configured to: identify that the electronic device is plugged into an external electronic device which is capable to mount on a head of a first user, by detecting a signal indicating a presence of the external electronic device, in a folded state, in response to identifying, receive, in a state where the first portion of the display is exposed in the first direction and the second portion of the display is exposed in the second direction opposite to the first direction, at least one message including first information regarding the first user and second information regarding an external environment comprising a second user from the external electronic device, wherein the first information is obtained by using a first sensor of the external electronic device, and the second information is obtained by using a second sensor of the external electronic device, and in response to the receiving at least one message, display, based on the first information and the second information, a first interface in the first portion of the display and a second interface in the second portion of the display. identify that the electronic device is plugged into an external electronic device which is capable to mount on a head of a first user, by detecting a signal indicating a presence of the external electronic device, in a folded state, in response to identifying, receive, in a state where the first portion of the display is exposed in the first direction and the second portion of the display is exposed in the second direction opposite to the first direction, at least one message including first information regarding the first user and second information regarding an external environment comprising a second user from the external electronic device, wherein the first information is obtained by using a first sensor of the external electronic device, and the second information is obtained by using a second sensor of the external electronic device, and in response to the receiving at least one message, display, based on the first information and the second information, a first interface in the first portion of the display and a second interface in the second portion of the display.