Electronic device and method for controlling battery charging
An electronic device may include a housing, a first interface, a second interface, a battery, a charger circuitry, and at least one processor. The at least one processor may determine information on a charging type of the external power supply connected through the first interface, acquire state information of the external electronic device connected through the second interface, acquire state information of the battery, determine a first power that will be supplied to the battery and a second power that will be supplied to the external electronic device, charge the battery based on the first power, and transmit the second power to the external electronic device through the second interface.
1 . An electronic device comprising:
a housing including an internal space for accommodating an external electronic device;
a first interface configured to be connected to an external power supply in one region of the housing;
a second interface configured to be connected to the external electronic device in one region of the internal space;
a battery disposed inside the housing;
a charger circuitry configured to be electrically connected to the first interface, the second interface, the battery; and
at least one processor electrically connected to the charger circuitry,
wherein the at least one processor is configured to:
determine a charging type of the external power supply when connected through the first interface,
acquire state information of the external electronic device when connected through the second interface, wherein the state information of the external electronic device comprises an indication of a user selected one of a first function and a second function to be performed by the external electronic device,
acquire state information of the battery,
determine a first power supplied to the battery and a second power supplied to the external electronic device, based on the state information of the battery, the user selected one of the first function or the second function to be performed by the external electronic device, the charging type of the external power supply, and
charge the battery based on the first power using the external power supply connected through the first interface, and transmit the second power based on the user selected one of the first function or the second function to be performed by the external electronic device to the external electronic device through the second interface, wherein:
when the user selects a first one of the first function and the second function, charging the battery based on the first power comprises charging the battery with a first amount of charging power, wherein the first amount of charging power is determined based on an expected amount of power consumed by the processor, camera, display, and communication module by performing the first one of the first function and the second function by the external electronic device; and
when the user selects a second one of the first function and the second function, charging the battery based on the first power comprises charging the battery charging the battery with a second amount of charging power, wherein the first amount of charging power is determined based on an expected amount of power consumed by the processor, camera, display, and communication module by performing the first one of the first function and the second function by the external electronic device.
2 . The electronic device of claim 1 , further comprising a display,
wherein the at least one processor is further configured to:
display a user interface (UI) for selecting a previously specified function that will be executed through the display, and
acquire the information on the previously specified function that will be executed, based on a user input to the UI.
3 . The electronic device of claim 1 , wherein the at least one processor is further configured to determine the first power and the second power such that the electronic device and the external electronic device perform a previously specified function that will be executed during a same time period.
4 . The electronic device of claim 1 , wherein the state information of the external electronic device further comprises battery state information of the external electronic device.
5 . The electronic device of claim 1 , wherein a previously specified function that will be executed comprises a combination of a function that will be executed by the electronic device and a function that will be executed by the external electronic device.
6 . The electronic device of claim 5 , wherein the external electronic device further comprises a first battery and a second battery, and
the at least one processor is further configured to determine a third power that will be supplied to the first battery and a fourth power that will be supplied to the second battery, based on the second power, state information of the first battery, state information of the second battery, and information on the function that will be executed by the external electronic device.
7 . The electronic device of claim 1 , further comprising a communication module,
wherein the at least one processor is further configured to:
transmit information on a user interface (UI) for selecting a previously specified function that will be executed, to the external electronic device through the communication module, and
acquire the information on the previously specified function that will be executed from the external electronic device through the communication module, based on a user input to the UI.
8 . The electronic device of claim 1 , further comprising a communication module,
the at least one processor is further configured to transmit information on a user interface (UI) for selecting a previously specified function that will be executed so that the UI is displayed on a display of a user device wirelessly connected through the communication module.
9 . The electronic device of claim 1 , wherein the external electronic device is a pair of smart glasses, and the electronic device is a case of the smart glasses.
10 . A method of operating an electronic device, comprising:
detecting that an external power supply is connected through a first interface;
determining a charging type of the external power supply connected through the first interface;
acquiring state information of an external electronic device when connected through a second interface, wherein the state information of the external electronic device comprises an indication of a user selected one of a first function and a second function to be performed by the external electronic device;
acquiring state information of a battery comprised in the electronic device;
determining a first power supplied to the battery of the electronic device and a second power supplied to the external electronic device, based on the state information of the battery of the electronic device, the user selected one of the first function or the second function to be performed by the external electronic device, and the charging type of the external power supply; and
charging the battery based on the first power using the external power supply when connected through the first interface, and transmitting the second power based on based on the user selected one of the first function or the second function to be performed by the external electronic device the function performed by the external electronic device to the external electronic device through the second interface, wherein:
when the user selects a first one of the first function and the second function, charging the battery based on the first power comprises charging the battery with a first amount of charging power, wherein the first amount of charging power is determined based on an expected amount of power consumed by the processor, camera, display, and communication module by performing the first one of the first function and the second function by the external electronic device; and
when the user selects a second one of the first function and the second function, charging the battery based on the first power comprises charging the battery with a second amount of charging power, wherein the first amount of charging power is determined based on an expected amount of power consumed by the processor, camera, display, and communication module by performing the first one of the first function and the second function by the external electronic device.
11 . The method of claim 10 , further comprising:
displaying, by the electronic device, a user interface (UI) for selecting a previously specified function that will be executed through a display of the electronic device; and
acquiring the information on the previously specified function that will be executed, based on a user input to the UI.
12 . The method of claim 10 , further comprising determining the first power and the second power such that the electronic device and the external electronic device perform a previously specified function during a same time period.
13 . The method of claim 10 , wherein the state information of the external electronic device further comprises information on the battery of the external electronic device.
14 . The method of claim 10 , wherein a previously specified function that will be executed comprises a combination of a function that will be executed by the electronic device and a function that will be executed by the external electronic device.
15 . The method of claim 14 , wherein the external electronic device further comprises a first battery and a second battery, and
the method further comprises determining a third power that will be supplied to the first battery and a fourth power that will be supplied to the second battery, based on the second power, the state information of the first battery, the state information of the second battery, and information on the function that will be executed by the external electronic device.
16 . The method of claim 10 , further comprising:
transmitting information on a user interface (UI) for selecting a previously specified function that will be executed, to the external electronic device; and
acquiring the information on the previously specified function that will be executed from the external electronic device, based on a user input to the UI.
17 . The method of claim 10 , further comprising transmitting, by the electronic device, information on a user interface (UI) in order to display the UI on a display of a wirelessly connected user device for selecting a previously specified function that will be executed, by using a communication module.
18 . The method of claim 10 , wherein the external electronic device is a pair of smart glasses, and the electronic device is a case of the smart glasses.