Patent ID: 11861382
Assignee: HUAWEI TECHNOLOGIES CO., LTD.
Field: Computer technology (Electrical engineering)
Classification: CPC G | IPC G

Claim 12:
13. An electronic device, comprising:
a first application,
a second application,
a first software module,
a second software module,
a third software module, wherein the first application is different from the second application,
a processor, and
a memory coupled to the processor to store instructions, which when executed by the processor, cause the device to perform operations, the operations comprising:
displaying a first interface of the first application, wherein the first interface comprises an icon of the second application;
in response to receiving a first operation performed on the icon of the second application, the first application sending a first message to the first software module, and the first application sending a second message to the second software module;
in response to receiving the first message, the first software module sending a third message to the first application, wherein the third message carries a first configuration item of the second application and a starting mode of a main entry activity of the second application;
in response to receiving the second message, the second software module sending a fourth message to the first application, wherein the fourth message carries a task list, and the task list is used to store a task corresponding to an application in the electronic device;
when determining that a task corresponding to a first instance of the second application exists in the task list, the first configuration item indicates that the second application supports a multi-instance feature, the second application supports starting of the multi-instance feature by using the main entry activity, and a starting mode of the main entry activity is a first mode, sending, by the first application, a fifth message to the second software module, wherein the fifth message carries an identifier of the main entry activity and a first identifier, and the first identifier is used to request to establish a first task stack;
in response to receiving the fifth message, the second software module establishing the first task stack based on the identifier of the main entry activity and the first identifier, wherein the first task stack is different from a task stack corresponding to the second application in the task list;
the second software module sending a sixth message to the third software module, wherein the sixth message carries the identifier of the main entry activity and an identifier of the first task stack; and
in response to receiving the sixth message, the third software module starting the main entry activity in the first task stack based on the identifier of the main entry activity and the identifier of the first task stack, to run a second instance of the second application.