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

Claim 10:
11. A method applied to an electronic device comprising:
displaying, by the electronic device, a first interface of a first application, wherein the first interface comprises an icon of a second application, wherein the electronic device comprises the first application, the second application, a first software module, a second software module, and a third software module, and wherein the first application is different from the second application;
in response to receiving a first operation performed on the icon of the second application, sending, by the first application, a first message to the first software module, and sending, by the first application, a second message to the second software module;
in response to receiving the first message, sending, by the first software module, 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, sending, by the second software module, 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, a starting mode of the main entry activity is a second mode, and the third message further carries an identifier of a first entry activity, sending, by the first application, a seventh message to the second software module, wherein the seventh message carries the identifier of the first entry activity and a second identifier, the first mode is different from the second mode, the first entry activity is an entry activity other than the main entry activity, and the second identifier is used to request to establish a second task stack;
in response to receiving the seventh message, establishing, by the second software module, the second task stack based on the identifier of the first entry activity and the second identifier, wherein the second task stack is different from a task stack corresponding to the second application in the task list;
sending, by the second software module, an eighth message to the third software module, wherein the eighth message carries the identifier of the first entry activity and an identifier of the second task stack; and
in response to receiving the eighth message, starting, by the third software module, the first entry activity in the second task stack based on the identifier of the first entry activity and the identifier of the second task stack, to run a second instance of the second application.