Electronic device capable of controlling neighboring device and method for controlling the same
A mobile device and a method of controlling the same. A control method according to an embodiment comprises displaying a user interface (UI) screen which includes a plurality of UI elements, detecting a first user input associated with a first UI element among the plurality of UI elements, identifying one or more identification codes associated with the first UI element based on the detecting of the first user input, detecting one or more neighboring devices based on the one or more identification codes, displaying a window which includes one or more UI elements associated with the one or more neighboring devices, detecting a second user input associated with a second UI element among the one or more UI elements, determining a neighboring device associated with the second UI element, among the one or more neighboring devices, as a controlled device controllable through the second UI element, based on detecting of the second user input, and transmitting a control command related to the first UI element to the neighboring device determined as the controlled device.
1 . A method of controlling a neighboring device by a mobile device, the method comprising:
displaying a user interface (UI) screen which includes a plurality of UI elements;
detecting a first user input associated with a first UI element among the plurality of UI elements, the first UI element being associated with a device function;
identifying one or more identification codes associated with the first UI element based on the detecting of the first user input;
detecting one or more neighboring devices based on the one or more identification codes, the one or more neighboring devices corresponding respectively to the one or more identification codes, and each of the one or more neighboring devices having the device function;
displaying a window which includes one or more UI elements associated with the one or more neighboring devices;
detecting a second user input associated with a second UI element among the one or more UI elements;
determining, based on the detecting of the second user input, a neighboring device corresponding to the second UI element, among the one or more neighboring devices, as a controlled device; and
transmitting a control command related to the first UI element to the neighboring device determined as the controlled device.
2 . The method of claim 1 , wherein each of the one or more identification codes includes a device code, a function code, and a mapping code,
wherein the device code is a code for identifying a corresponding device among the one or more neighboring devices,
wherein the function code is a code associated with the device function.
3 . The method of claim 2 , wherein, in case that a number of the one or more neighboring devices is multiple, function codes of the multiple neighboring devices are the same, and device codes of the multiple neighboring devices are different.
4 . The method of claim 2 , wherein the mapping code is associated with a component type of the first UI element.
5 . The method of claim 1 , further comprising performing a device function corresponding to the first UI element based on detecting a third user input associated with the first UI element, wherein the third user input is different from the first user input.
6 . The method of claim 1 , wherein the window is any one of a map-type window, a modal-type window, a bar-type window, or a list-type window.
7 . The method of claim 6 , wherein, based on the window being the map-type window, the one or more UI elements are displayed on the map-type window, and
wherein one or more display positions of the one or more UI elements on the map-type window are determined based on at least one of one or more distances between the mobile device and the one or more neighboring devices or one or more positions of the one or more neighboring devices.
8 . The method of claim 7 , wherein the first UI element at least partially overlaps the map-type window.
9 . The method of claim 7 , wherein the map-type window includes a plurality of iso-level lines, and
wherein the first UI element is positioned in a center of the plurality of iso-level lines.
10 . The method of claim 7 , further comprising identifying the one or more distances between the mobile device and the one or more neighboring devices or the one or more positions of the one or more neighboring devices, through an inertial measurement unit (IMU) sensor and a transceiver included in the mobile device.
11 . The method of claim 6 , wherein based on the window being any one of the modal-type window, the bar-type window, or the list-type window, the one or more UI elements are arranged based on one or more priorities of the one or more UI elements, and
wherein the one or more priorities of the one or more UI elements are determined based on at least one of one or more distances between the mobile device and the one or more neighboring devices or one or more positions of the one or more neighboring devices.
12 . The method of claim 11 , wherein a badge indicating a number of devices associated with at least one UI element of the one or more UI elements is coupled to the at least one UI element.
13 . The method of claim 12 , further comprising determining one or more neighboring devices associated with a third UI element among the at least one UI element to which the badge is coupled, as one or more controlled devices controllable through the third UI element, based on detecting a fourth user input associated with the third UI element.
14 . The method of claim 12 , further comprising displaying an additional list-type window for indicating at least some of one or more neighboring devices associated with a third UI element among the at least one UI element to which the badge is coupled, based on detecting a fifth user input associated with the third UI element.
15 . A mobile device, comprising:
a display,
one or more memories,
one or more transceivers, and
one or more processors configured to:
control the display to display a user interface (UI) screen which includes a plurality of UI elements;
detect a first user input associated with a first UI element among the plurality of UI elements, the first UI element being associated with a device function;
identify one or more identification codes associated with the first UI element based on the detecting of the first user input;
detect one or more neighboring devices based on the one or more identification codes, the one or more neighboring devices corresponding respectively to the one or more identification codes, and each of the one or more neighboring devices having the device function;
control the display to display a window which includes one or more UI elements associated with the one or more neighboring devices;
detect a second user input associated with a second UI element among the one or more UI elements;
determine a neighboring device corresponding to the second UI element, among the one or more neighboring devices, as a controlled device, based on the detecting of the second user input; and
control the one or more transceivers to transmit a control command related to the first UI element to the neighboring device determined as the controlled device.
16 . The mobile device of claim 15 , wherein each of the one or more identification codes include a device code, a function code, and a mapping code,
wherein the device code is a code for identifying a corresponding device among the one or more neighboring devices,
wherein the function code is a code associated with the device function.
17 . The mobile device of claim 16 , wherein the mapping code is associated with a component type of the first UI element.
18 . The mobile device of claim 15 , wherein the one or more processors are configured to perform a device function corresponding to the first UI element based on detecting a third user input associated with the first UI element, different from the first user input.
19 . The mobile device of claim 15 , wherein the window is any one of a map-type window, a modal-type window, a bar-type window, or a list-type window.
20 . The mobile device of claim 19 , wherein, based on the window being the map-type window, the one or more UI elements are displayed on the map-type window, and
wherein one or more display positions of the one or more UI elements on the map-type window are determined based on at least one of one or more distances between the mobile device and the one or more neighboring devices or one or more positions of the one or more neighboring devices.