Application starting method, electronic device, and readable storage medium

By saving a snapshot when the application switches from the foreground to the background and displaying the snapshot during a warm restart, the problem of application startup delay on electronic devices is solved, and the application startup response speed is improved.

CN118661150BActive Publication Date: 2026-04-17HONOR DEVICE CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
HONOR DEVICE CO LTD
Filing Date
2022-09-06
Publication Date
2026-04-17

AI Technical Summary

Technical Problem

When electronic devices launch applications, users need to wait a relatively long time after completing their operations before the application interface is displayed, resulting in slow application startup response speed.

Method used

When an application switches from the foreground to the background, a snapshot of its last displayed interface is saved and displayed during a warm restart. At the same time, the application's activity is restored to display the same interface until preset conditions are met before the actual interface is displayed.

Benefits of technology

By displaying snapshots and recovery activities, the latency during application startup is reduced, improving the application's startup response speed from the user's perspective.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118661150B_ABST
    Figure CN118661150B_ABST
Patent Text Reader

Abstract

An application startup method, an electronic device, and a readable storage medium are disclosed, relating to the field of terminal application technology. The method includes: when an application switches from the foreground to the background, saving a snapshot of the last screen (i.e., the first screen) displayed before the application switched to the background; when the user restarts the application by clicking its icon on the system desktop, and given that the application process has not ended, the first activity corresponding to the first screen has not been destroyed, and the application needs to create a new activity upon startup, the electronic device first displays the snapshot; after the electronic device restores the first activity, it displays the first screen corresponding to the first activity. Because the application's snapshot is displayed first when a new activity needs to be created, and the snapshot (i.e., the snapshot of the first screen corresponding to the activity to be restored) is identical to the content of the first screen displayed after the application starts, the application startup response speed is improved from the user's perspective.
Need to check novelty before this filing date? Find Prior Art

Description

[0001] This application claims priority to Chinese Patent Application No. 202111449783.8, filed with the State Intellectual Property Office of China on November 30, 2021, entitled "Application Launching Method, Electronic Device and Readable Storage Medium", the entire contents of which are incorporated herein by reference. Technical Field

[0002] This application relates to the field of terminal applications, and in particular to application startup methods, electronic devices, and readable storage media. Background Technology

[0003] As electronic devices become increasingly intelligent, the number of applications installed and running on them is also increasing. When users use the services provided by these applications, they need to perform actions to launch them. For example, a user clicks on the application's icon on the device's system desktop, and the device can open the application and display its interface.

[0004] When an electronic device launches an application, its internal system needs to process the data to display the application's interface. Therefore, there may be a delay before the application interface appears after the user's action. Currently, the time between the user's action and the application interface appearing is relatively long, resulting in a slow application launch response from the user's perspective. Summary of the Invention

[0005] This application provides an application startup method, an electronic device, and a readable storage medium, which can improve the startup response speed of application software.

[0006] To achieve the above objectives, this application adopts the following technical solution:

[0007] Firstly, this application provides an application launch method, the method comprising:

[0008] The electronic device displays the first interface of the first application;

[0009] The first operation by which an electronic device receives user input;

[0010] In response to the first action, the electronic device switches the first application to run in the background;

[0011] The electronic device receives a second operation from user input;

[0012] In response to the second operation, the electronic device launches the first application;

[0013] During the startup of the first application, if the first application meets the preset conditions, the electronic device displays the first image, wherein the first image is related to the first interface, and the preset conditions include: the process of the first application has not ended, the first activity corresponding to the first interface has not been destroyed, and the first application needs to create a second activity when it starts.

[0014] After the electronic device resumes its primary activity, it displays the first interface.

[0015] When an application needs to create a new activity, it first displays a snapshot of the application. During the snapshot display, the system internally creates a new activity and restores the target activity (the activity corresponding to the interface displayed before the application returned to the background, and which was not destroyed), resulting in the interface corresponding to the target activity. Because the activity corresponding to the interface displayed before the application returned to the background is the same activity restored after the application starts, the snapshot displayed by the application and the first interface displayed after the application starts have the same content. From the user's perspective, this improves the application's startup response speed.

[0016] As one implementation of the first aspect of this application, after the electronic device receives the first operation input by the user, the method further includes:

[0017] The electronic device obtains a second image based on the first interface;

[0018] The electronic device caches a second image, which contains the first image.

[0019] In this application, the first image is the first interface of the first application, and the cached second image can be the image of the first interface of the first application, or it can be the image of the first interface of the first application and the image of the status bar.

[0020] As one implementation of the first aspect of this application, before the electronic device displays the first image, the method further includes:

[0021] The electronic device has determined that the process of applying the first application has not yet ended;

[0022] The electronic device determined that the first activity corresponding to the first interface had not been destroyed.

[0023] The electronic device determines that the first application needs to create a second activity upon startup.

[0024] As one implementation of the first aspect of this application, the electronic device includes a logic judgment component and an activity task management component, wherein the activity task management component is used to record the state of the application's process.

[0025] The electronic device determines that the process of the first application has not ended, including:

[0026] The logic judgment component obtains the process status of the first application from the activity task management component;

[0027] The logic judgment component determines that the process of the first application has not ended based on the process status of the first application.

[0028] As one implementation of the first aspect of this application, the electronic device includes a logic judgment component and an activity recording component, wherein the activity recording component is used to record the state of the activity.

[0029] The electronic device determines that the first activity corresponding to the first interface has not been destroyed, including:

[0030] The logic judgment component obtains the state of the first activity from the activity record component;

[0031] The logic judgment component determines that the first activity has not been destroyed based on its state.

[0032] As one implementation of the first aspect of this application, the electronic device includes an activity task management component, which is used to send startup information of the first application to a logic judgment component when the first application starts, and the startup information of the first application includes the target activity when the first application starts.

[0033] Before the logic judgment component obtains the state of the first activity from the activity record component, this method also includes:

[0034] The logic judgment component receives the startup information of the first application sent by the activity task management component;

[0035] The logic judgment component determines the target activity when the first application starts as the first activity based on the startup information of the first application.

[0036] As one implementation of the first aspect of this application, the electronic device includes a logic judgment component and an activity task management component. The activity task management component is used to send the startup information of the first application to the logic judgment component when the first application starts. The startup information of the first application includes the creation of a second activity.

[0037] Before the electronic device determines that the first application needs to create a second activity upon startup, the method further includes:

[0038] The logic judgment component receives the startup information of the first application sent by the activity task management component;

[0039] The electronic device determines that the first application needs to create a second activity upon startup, including:

[0040] The logic judgment component determines whether the first application needs to create a second activity upon startup based on the startup information of the first application.

[0041] As one implementation of the first aspect of this application, the electronic device also includes a desktop launcher;

[0042] The second operation of the electronic device receiving user input is as follows:

[0043] The desktop launcher receives a second action from the user;

[0044] The method also includes:

[0045] In response to the second operation, the desktop launcher sends a launch command for the first application to the active task management component;

[0046] In response to receiving a startup command, the activity task management component obtains the startup information of the first application;

[0047] The activity task management component sends the startup information of the first application to the logic judgment component.

[0048] As one implementation of the first aspect of this application, the electronic device includes: an activity task management component, a logic judgment component, a snapshot module, and a WMS;

[0049] The electronic device caches a second image, including:

[0050] The snapshot module caches the second image;

[0051] When the first application meets preset conditions, the electronic device displays a first image, including:

[0052] If the logic judgment component determines that the first application meets the preset conditions, the logic judgment component sends the first information to the activity task management component. The first information is used to indicate that the first application meets the preset conditions.

[0053] Upon receiving the first information, the activity task management component sends the second information to the snapshot module, which instructs the snapshot module to send the second image to the WMS.

[0054] The snapshot module sends a second image to the WMS;

[0055] WMS controls the electronic device to display the first image based on the second image.

[0056] As one implementation of the first aspect of this application, the electronic device includes: an activity recording component;

[0057] The activity task management component sends the following second information to the snapshot module:

[0058] The activity task management component sends a second message to the snapshot module through the activity record component.

[0059] As one implementation of the first aspect of this application, the first image is the same as the second image, and the first image is the same as the image of the first interface;

[0060] Alternatively, the first image is the same as the image on the first interface, and the second image includes the image on the first interface and the content of the first status bar, where the content of the first status bar is the status bar content of the electronic device when the second image is cached.

[0061] In this application, a snapshot of the application saved before it is pushed back to the background is recorded as the second image. In this embodiment, a snapshot displayed when the application is restarted is recorded as the first image. The saved snapshot (second image) includes the first interface of the first application, and may or may not include the status bar (status bar content at the time of the screenshot). The displayed snapshot (first image) is an image that includes the first interface of the first application but does not include the status bar content. When the electronic device displays the first image, if the second image does not include the status bar (status bar content at the time of the screenshot), the saved second image and the current status bar content need to be combined; if the second image includes the status bar (status bar content at the time of the screenshot), the current system status bar content covers the status bar area of ​​the second image; or the second image is processed by taking a screenshot to obtain a first image that includes the first interface of the first application but does not include the status bar content, and then when the electronic device displays the first image, the first image and the status bar content are combined.

[0062] As one implementation of the first aspect of this application, after the snapshot module sends the second image to the WMS, the method further includes:

[0063] The snapshot module sends a message to the activity task management component indicating that the second image has been successfully added;

[0064] In response to receiving the message that the second image has been successfully added, the activity task management component sends a first instruction to the WMS through the snapshot module; the first instruction is used to instruct the WMS to control the electronic device to display the first image based on the second image.

[0065] As one implementation of the first aspect of this application, the electronic device includes an activity recording component;

[0066] The snapshot module sends a message to the activity task management component indicating that the second image has been successfully added, including:

[0067] The snapshot module sends a message indicating that the second image has been successfully added to the activity task management component through the activity record component.

[0068] As one implementation of the first aspect of this application, the second operation is an operation performed on the icon of the first application displayed on the system desktop of the electronic device, and the electronic device also includes: a desktop launcher;

[0069] After the activity task management component sends the first instruction to the WMS via the snapshot module, the method also includes:

[0070] The activity task management component sends a third message to the desktop launcher, which instructs the desktop launcher to stop displaying the system desktop.

[0071] As one implementation of the first aspect of this application, the snapshot module caches the second image including:

[0072] The snapshot module caches the second image in the snapshot cache file;

[0073] Accordingly, the snapshot module sends the second image to the WMS, including:

[0074] The snapshot module retrieves the second image from the snapshot cache file;

[0075] The snapshot module sends a second image to WMS.

[0076] As one implementation of the first aspect of this application, before the electronic device receives the second operation of user input, the method further includes:

[0077] The electronic device receives a third operation from user input;

[0078] In response to the third operation, the electronic device launches the second application and displays the second interface of the second application.

[0079] After the first application is brought back to the background, the user can perform other operations on the electronic device, such as launching a second application via a third operation; or the second application can be brought back to the background again, allowing the electronic device to display the system desktop. Of course, after the first application is brought back to the background, the user can launch multiple applications before returning to the system desktop. Alternatively, the first application can be launched from another application without returning to the system desktop.

[0080] As one implementation of the first aspect of this application, before the electronic device resumes its first activity, the method further includes:

[0081] Electronic devices create a second activity.

[0082] As one implementation of the first aspect of this application, the first operation includes: a gesture operation on the touch screen of an electronic device; or, a gesture operation within the field of view of the camera of an electronic device.

[0083] In this application, the first operation can be any operation that switches the first application from running in the foreground to running in the background when the first interface of the first application is displayed on the electronic device.

[0084] In a second aspect, an electronic device is provided, including a processor for running a computer program stored in a memory to implement the method of any one of the first aspects of this application.

[0085] Thirdly, a chip system is provided, including a processor coupled to a memory, wherein the processor executes a computer program stored in the memory to implement the method of any one of the first aspects of this application.

[0086] Fourthly, a computer-readable storage medium is provided, which stores a computer program that, when executed by one or more processors, implements the method of any one of the first aspects of this application.

[0087] Fifthly, this application provides a computer program product that, when run on a device, causes the device to perform the method of any one of the first aspects of this application.

[0088] It is understood that the beneficial effects of the second to fifth aspects mentioned above can be found in the relevant descriptions in the first aspect mentioned above, and will not be repeated here. Attached Figure Description

[0089] Figure 1 A schematic diagram of the hardware structure of an electronic device provided in an embodiment of this application;

[0090] Figure 2 This application provides a schematic diagram illustrating the application response time during application startup, as shown in the embodiments of this application.

[0091] Figure 3 This application provides a schematic diagram of the interface during application startup.

[0092] Figure 4 This is a schematic diagram of the interface when another application is launched, provided as an embodiment of this application.

[0093] Figure 5 This is a schematic diagram of the interface when another application is launched, provided as an embodiment of this application.

[0094] Figure 6 This is a schematic diagram of the interface when another application is launched, provided as an embodiment of this application.

[0095] Figure 7 This is a schematic diagram of the interface when another application is launched, provided as an embodiment of this application.

[0096] Figure 8 This is a schematic diagram of the interface when another application is launched, provided as an embodiment of this application.

[0097] Figure 9 This is a schematic diagram of the interface when another application is launched, provided as an embodiment of this application.

[0098] Figure 10 This is a technical architecture diagram of the application startup method provided in the embodiments of this application;

[0099] Figure 11 A timing diagram of the application startup method provided in the embodiments of this application;

[0100] Figure 12 A schematic diagram illustrating the method of launching an application as provided in an embodiment of this application;

[0101] Figure 13 This is a schematic diagram of the application startup process provided in the embodiments of this application. Detailed Implementation

[0102] In the following description, specific details such as particular system architectures and techniques are set forth for illustrative purposes and not for limiting purposes, in order to provide a thorough understanding of the embodiments of this application. However, those skilled in the art will understand that this application may also be implemented in other embodiments without these specific details.

[0103] It should be understood that, when used in this application specification and the appended claims, the term "comprising" indicates the presence of the described feature, integral, step, operation, element and / or component, but does not exclude the presence or addition of one or more other features, integrals, steps, operations, elements, components and / or collections thereof.

[0104] It should also be understood that in the embodiments of this application, "one or more" refers to one, two, or more; "and / or" describes the relationship between the associated objects, indicating that three relationships can exist; for example, A and / or B can represent: A existing alone, A and B existing simultaneously, or B existing alone, where A and B can be singular or plural. The character " / " generally indicates that the preceding and following associated objects have an "or" relationship.

[0105] Furthermore, in the description of this application and the appended claims, the terms "first," "second," "third," "fourth," etc., are used only to distinguish descriptions and should not be construed as indicating or implying relative importance.

[0106] References to "one embodiment" or "some embodiments" as described in this specification mean that one or more embodiments of this application include a specific feature, structure, or characteristic described in connection with that embodiment. Therefore, the phrases "in one embodiment," "in some embodiments," "in other embodiments," "in still other embodiments," etc., appearing in different parts of this specification do not necessarily refer to the same embodiment, but rather mean "one or more, but not all, embodiments," unless otherwise specifically emphasized. The terms "comprising," "including," "having," and variations thereof mean "including but not limited to," unless otherwise specifically emphasized.

[0107] This application provides an application launch method applicable to electronic devices. These electronic devices can be tablets, mobile phones, wearable devices, laptops, ultra-mobile personal computers (UMPCs), netbooks, personal digital assistants (PDAs), and other similar devices. This application does not limit the specific type of electronic device.

[0108] Figure 1 A schematic diagram of an electronic device is shown. The electronic device 100 may include a processor 110, an external memory interface 120, an internal memory 121, a universal serial bus (USB) interface 130, a charging management module 140, a power management module 141, a battery 142, antenna 1, antenna 2, a mobile communication module 150, a wireless communication module 160, an audio module 170, a speaker 170A, a receiver 170B, a microphone 170C, a headphone jack 170D, a sensor module 180, buttons 190, a motor 191, a camera 193, a display screen 194, and a subscriber identification module (SIM) card interface 195, etc. The sensor module 180 may include a pressure sensor 180A, a touch sensor 180K, etc.

[0109] It is understood that the structures illustrated in the embodiments of this application do not constitute a specific limitation on the electronic device 100. In other embodiments of this application, the electronic device 100 may include more or fewer components than illustrated, or combine some components, or split some components, or have different component arrangements. The illustrated components may be implemented in hardware, software, or a combination of software and hardware.

[0110] Processor 110 may include one or more processing units, such as an application processor (AP), a modem processor, a graphics processing unit (GPU), an image signal processor (ISP), a controller, memory, a video codec, a digital signal processor (DSP), a baseband processor, and / or a neural network processing unit (NPU). Different processing units may be independent devices or integrated into one or more processors. For example, processor 110 is used to execute the application startup method in the embodiments of this application.

[0111] The controller can be the nerve center and command center of the electronic device 100. The controller can generate operation control signals according to the instruction opcode and timing signals to complete the control of instruction fetching and execution.

[0112] The processor 110 may also include a memory for storing instructions and data. In some embodiments, the memory in the processor 110 is a cache memory. This memory can store instructions or data that the processor 110 has just used or that are used repeatedly. If the processor 110 needs to use the instruction or data again, it can retrieve it directly from the memory. This avoids repeated accesses, reduces the waiting time of the processor 110, and thus improves the efficiency of the system.

[0113] USB interface 130 is an interface that conforms to the USB standard specification, specifically it can be a Mini USB interface, Micro USB interface, USB Type C interface, etc. USB interface 130 can be used to connect a charger to charge electronic device 100, and it can also be used for data transfer between electronic device 100 and peripheral devices.

[0114] The external storage interface 120 can be used to connect an external memory card, such as a Micro SD card, to expand the storage capacity of the electronic device 100. The external memory card communicates with the processor 110 through the external storage interface 120 to perform data storage functions. For example, music, video, and other files can be saved on the external memory card.

[0115] Internal memory 121 can be used to store executable program code, which includes instructions. Processor 110 executes various functional applications and data processing of electronic device 100 by running the instructions stored in internal memory 121. Internal memory 121 may include a program storage area and a data storage area. The program storage area may store the operating system and at least one application program required for a given function (such as sound playback, image playback, etc.).

[0116] In addition, the internal memory 121 may include high-speed random access memory, and may also include non-volatile memory, such as at least one disk storage device, flash memory device, universal flash storage (UFS), etc.

[0117] The charging management module 140 is used to receive charging input from the charger. The charger can be a wireless charger or a wired charger. In some wired charging embodiments, the charging management module 140 can receive charging input from the wired charger via the USB interface 130.

[0118] The power management module 141 is used to connect the battery 142, the charging management module 140, and the processor 110. The power management module 141 receives input from the battery 142 and / or the charging management module 140 to power the processor 110, internal memory 121, external memory, display 194, camera 193, and wireless communication module 160, etc.

[0119] In some other embodiments, the power management module 141 may also be located within the processor 110. In other embodiments, the power management module 141 and the charging management module 140 may also be located in the same device.

[0120] The wireless communication function of electronic device 100 can be realized through antenna 1, antenna 2, mobile communication module 150, wireless communication module 160, modem processor and baseband processor, etc.

[0121] Antenna 1 and antenna 2 are used to transmit and receive electromagnetic wave signals. Each antenna in electronic device 100 can be used to cover one or more communication frequency bands. Different antennas can also be multiplexed to improve antenna utilization. For example, antenna 1 can be multiplexed as a diversity antenna for a wireless local area network. In some other embodiments, the antennas can be used in conjunction with tuning switches.

[0122] The mobile communication module 150 can provide solutions for wireless communication, including 2G / 3G / 4G / 5G, applied to the electronic device 100. The mobile communication module 150 may include at least one filter, switch, power amplifier, low noise amplifier (LNA), etc. The mobile communication module 150 can receive electromagnetic waves via antenna 1, and perform filtering, amplification, and other processing on the received electromagnetic waves before transmitting them to a modem processor for demodulation. The mobile communication module 150 can also amplify the signal modulated by the modem processor and convert it into electromagnetic waves for radiation via antenna 1.

[0123] The wireless communication module 160 can provide solutions for wireless communication applications on the electronic device 100, including wireless local area networks (WLANs) (such as wireless fidelity (Wi-Fi) networks), Bluetooth (BT), global navigation satellite system (GNSS), frequency modulation (FM), near field communication (NFC), and infrared (IR) technologies. The wireless communication module 160 can be one or more devices integrating at least one communication processing module. The wireless communication module 160 receives electromagnetic waves via antenna 2, performs frequency modulation and filtering of the electromagnetic wave signals, and sends the processed signal to processor 110. The wireless communication module 160 can also receive signals to be transmitted from processor 110, perform frequency modulation and amplification, and convert them into electromagnetic waves for radiation via antenna 2.

[0124] In some embodiments, antenna 1 of electronic device 100 is coupled to mobile communication module 150, and antenna 2 is coupled to wireless communication module 160, so that electronic device 100 can communicate with networks and other devices through wireless communication technology.

[0125] Electronic device 100 can implement audio functions, such as music playback and recording, through audio module 170, speaker 170A, receiver 170B, microphone 170C, headphone jack 170D, and application processor.

[0126] The audio module 170 is used to convert digital audio signals into analog audio signals for output, and also to convert analog audio inputs into digital audio signals. The audio module 170 can also be used for encoding and decoding audio signals. In some embodiments, the audio module 170 may be located in the processor 110, or some functional modules of the audio module 170 may be located in the processor 110.

[0127] The speaker 170A, also known as a "loudspeaker," is used to convert audio electrical signals into sound signals. The electronic device 100 can listen to music or make hands-free calls through the speaker 170A.

[0128] The receiver 170B, also known as the "earpiece," is used to convert audio electrical signals into sound signals. When the electronic device 100 answers a telephone call or voice message, the receiver 170B can be brought close to the ear to listen to the voice.

[0129] Microphone 170C, also known as a "microphone" or "voice transducer," is used to convert sound signals into electrical signals. When making a phone call or sending a voice message, the user can speak by bringing their mouth close to microphone 170C, inputting the sound signal into microphone 170C. Electronic device 100 may have at least one microphone 170C. In some embodiments, electronic device 100 may have two microphones 170C, which, in addition to monitoring voice messages, can also perform noise reduction. In other embodiments, electronic device 100 may also have three, four, or more microphones 170C, enabling sound signal acquisition, noise reduction, sound source identification, and directional recording functions, etc.

[0130] The 170D headphone jack is used to connect wired headphones. The 170D headphone jack can be a USB 130 interface or a 3.5mm Open Mobile Terminal Platform (OMTP) standard interface, a CTIA (Cellular Telecommunications Industry Association of the USA) standard interface.

[0131] Pressure sensor 180A is used to sense pressure signals and convert them into electrical signals. In some embodiments, pressure sensor 180A can be disposed on display screen 194. There are many types of pressure sensors 180A, such as resistive pressure sensors, inductive pressure sensors, and capacitive pressure sensors. A capacitive pressure sensor may include at least two parallel plates with conductive material. When a force is applied to pressure sensor 180A, the capacitance between the electrodes changes. Electronic device 100 determines the pressure intensity based on the change in capacitance. When a touch operation is applied to display screen 194, electronic device 100 detects the touch operation intensity based on pressure sensor 180A. Electronic device 100 can also calculate the touch position based on the detection signal from pressure sensor 180A.

[0132] Touch sensor 180K, also known as a "touch panel," can be located on display screen 194. The touch sensor 180K and display screen 194 together form a touchscreen, also known as a "touch screen." Touch sensor 180K detects touch operations applied to or near it. The touch sensor can transmit the detected touch operation to the application processor to determine the type of touch event. Visual output related to the touch operation can be provided through display screen 194. In other embodiments, touch sensor 180K may also be located on the surface of electronic device 100, in a different position than display screen 194.

[0133] Buttons 190 include a power button, volume buttons, etc. Buttons 190 can be mechanical buttons or touch-sensitive buttons. Electronic device 100 can receive button input and generate key signal inputs related to user settings and function control of electronic device 100.

[0134] Motor 191 can generate vibration alerts. Motor 191 can be used for incoming call vibration alerts or for touch vibration feedback.

[0135] Electronic device 100 implements display functions through a GPU, a display screen 194, and an application processor. The GPU is a microprocessor for image processing, connected to the display screen 194 and the application processor. The GPU is used to perform mathematical and geometric calculations and for graphics rendering. Processor 110 may include one or more GPUs, which execute program instructions to generate or modify display information.

[0136] The display screen 194 is used to display images, videos, etc. In some embodiments, the electronic device 100 may include one or N display screens 194, where N is a positive integer greater than 1.

[0137] Camera 193 is used to capture still images or videos. In some embodiments, electronic device 100 may include one or N cameras 193, where N is a positive integer greater than 1.

[0138] The SIM card interface 195 is used to connect a SIM card. The SIM card can be inserted into or removed from the SIM card interface 195 to achieve contact and separation with the electronic device 100. The electronic device 100 can support one or N SIM card interfaces, where N is a positive integer greater than 1.

[0139] This application does not specifically limit the structure of the execution entity of an application startup method. Any method can be executed by running code containing the application startup method of this application. For example, the execution entity of the application startup method provided in this application can be a functional module in an electronic device capable of calling and executing programs, or a processing device applied in an electronic device, such as a chip.

[0140] Figure 1 The electronic device shown can install and run applications. When application A (any application installed on the electronic device) is running in the foreground, the screen of the electronic device displays the interface of application A, and the user of the electronic device can interact with the currently displayed interface of application A. When application A is running in the background, the electronic device no longer displays the interface of application A, and the user of the electronic device cannot interact with the interface of application A; however, application A can receive other information while running in the background (for example, an instant messaging application can receive messages sent by other users) and notify the user of that other information.

[0141] When a user launches application A from the desktop of an electronic device, if application A is not running (neither in the background nor in the foreground), the device first creates a process for the application. Once the process is successfully created, an activity (e.g., Activity1) of application A is run through this process. Activity1 enters the task stack and is placed at the top. The electronic device displays an interface (1) corresponding to Activity1. The user can interact with interface 1. If this interaction results in the display of a new interface, the application A process runs a new Activity (e.g., Activity2). Activity2 enters the task stack and is placed at the top, while the old Activity1 is pushed to the bottom. The screen then displays interface 2, and the old Activity1 is destroyed. Alternatively, the user can interact with interface 2 (e.g., the back button) to bring Activity1 back to the top of the task stack, destroying Activity2. The screen then displays interface 1, the top of the task stack.

[0142] As described above, each interface displayed by the application depends on the application's process running its respective Activity. Furthermore, after an application moves from the foreground to the background, its process may still exist in the system (e.g., the application's process is not terminated). Conversely, after an application moves from the foreground to the background, its process may also be destroyed, meaning the application's process no longer exists in the system background.

[0143] When application A starts, if there is no process for application A in the background of the electronic device system, the system needs to create a new process for application A. This startup process is called a cold start.

[0144] When application A starts, if a process for application A already exists in the background of the electronic device system, the system no longer needs to create a process for application A. This startup process is called a warm start.

[0145] This application's embodiments can be applied to application warm-start scenarios; see [link / reference]. Figure 2 This is one application scenario provided by an embodiment of this application. See also Figure 2 In (a), the electronic device displays the system desktop, and the user clicks the icon of application A (e.g., a video icon) on the electronic device's system desktop. For example, when the electronic device displays... Figure 2 When the system desktop is displayed in (a) of the diagram, the process of application A exists in the system background. After the user clicks the icon of application A, the electronic device displays the interface of application A after a period of time. See [link to documentation]. Figure 2 (b) of the present application. Embodiments of this application are used to improve the electronic device's... Figure 2 The click operation shown in (a) in the image is displayed. Figure 2 The response speed between the interfaces of application A corresponding to (b) in this application embodiment, Figure 2 The interface corresponding to (b) is the last interface displayed when application A returned to the background last time.

[0146] Of course, in practical applications, from Figure 2 The interface corresponding to (a) in the text (the interface corresponding to the system desktop) to Figure 2 In (b) of this example, other interfaces can also be displayed in the middle of the application A interface, such as the advertisement interface when application A starts up. Animations can also be displayed in the middle, such as the animation corresponding to the process of application A's icon changing from a colored icon to a grayscale icon and then back to a colored icon.

[0147] Of course, in practical applications, from Figure 2 The interface corresponding to (a) in the text is... Figure 2 In (b) of the example, the interface may not display other interfaces in the middle. For example, after the user clicks the icon of application A, in... Figure 2 The interface corresponding to (a) in the text remains for a period of time until it displays... Figure 2 (b) The interface opposite.

[0148] In this embodiment, the last screen displayed by the electronic device before it runs from the foreground to the background can be denoted as screen A. After the electronic device enters the background, the user can click the icon of application A on the desktop (see...). Figure 2 (a) in the example switches application A to the foreground. In a warm start scenario, although the process of application A is not destroyed before it runs from the background to the foreground, the interface A has been destroyed. After the electronic device detects a click on the icon of application A, it needs to redraw the interface A using the process of application A. If the system load of the electronic device is heavy, or the interface A is complex, or the memory of the electronic device has been swapped out (for example, some data under the process of application A has been swapped from memory to disk), the electronic device will take a long time to draw the interface A, resulting in a slow response speed and affecting the user experience.

[0149] This application embodiment can be configured to save a snapshot of the last screen displayed before the application was switched to the background when the application is switched to the background. In this application embodiment, the snapshot refers to the snapshot of the last screen displayed before the application was switched to the background. In the case of a hot start (the application enters the foreground from the background without its process being terminated), the snapshot of the last screen displayed before the application was switched to the background is first displayed. After the Activity at the top of the task stack when the application was switched to the background is restored and its corresponding screen is obtained, the obtained screen is then displayed. Typically, the screen corresponding to the Activity at the top of the task stack before the application was switched to the background is the last screen displayed before the application was switched to the background.

[0150] To gain a clearer understanding of the above examples, let's first... Figures 3 to 9 A diagram illustrating the display logic of the snapshot taken when the application starts.

[0151] See Figures 3 to 4 This is one application scenario provided by the embodiments of this application. Figure 3 In scenario (a), the electronic device displays the system desktop, and the user clicks the icon of application A (e.g., a video application) on the system desktop. At this time, there is no process for application A in the system background, i.e., application A is in a cold start.

[0152] During the cold start process of application A, the system first creates a process for application A. After creating the process for application A, the process of application A starts the main activity of application A and draws the interface corresponding to the main activity.

[0153] Because the cold start process of application A takes a relatively long time, from the user's perspective, after clicking the icon of application A, the electronic device's interface may still display the original interface (system desktop). See [link / reference]. Figure 3 (b) in the middle.

[0154] Figure 3 The illustrated embodiment uses the example of an application A starting up without an advertising interface. During the display of the original interface (the interface where application A is located, which can be the system desktop) on the electronic device, other animation effects can be added. For example, the application icon of the clicked application A can be changed from a colored icon to a grayscale icon and then back to a colored icon; or the application icon can be enlarged by a preset factor and then returned to its original size. Of course, the above changes in the application icon are still animation effects against the background of the interface where the application icon is located (the system desktop where application A is located). In this embodiment, the above process of changing the application icon can be understood as displaying the original interface (the system desktop where application A is located).

[0155] See Figure 3 In (c), after the process of application A draws the interface corresponding to the main Activity, the electronic device displays the interface corresponding to the main Activity.

[0156] From the user's perspective, Figure 3 The click operation corresponding to (a) in the text is displayed. Figure 3 The application interface corresponding to (c) takes a long time to load, and application A's startup response is slow.

[0157] On electronic device display Figure 3 Following the interface of application A (e.g., a video application) shown in (c), the user swipes up from the bottom of the screen to bring the application from the foreground to the background and cause the electronic device to display... Figure 3 The system desktop is shown in (e). For ease of description, the interface displayed on the electronic device before the application moves from the foreground to the background is denoted as Interface 1, and the Activity corresponding to Interface 1 is denoted as Activity1. Before the application moves from the foreground to the background, Interface 1 corresponding to Activity1 is saved as a snapshot (snapshot1).

[0158] See Figure 3 In step (d), the snapshot obtained at this point is an image captured by taking a screenshot of the corresponding interface 1 of Activity1. Figure 3 (d) can be understood as follows: although the interface currently displayed by the electronic device consists of the interface of application A and the status bar, the saved snapshot is an image corresponding to the interface of application A, which does not include the status bar.

[0159] certainly, Figure 3(d) in the example is for illustrative purposes only. In practical applications, the resulting snapshot can also be an image obtained by taking a screenshot of the interface currently displayed on the electronic device. This image includes the interface and status bar of application A.

[0160] Users Figure 3 In the example (e), clicking the icon of application A on the system desktop indicates that application A's process was not destroyed before the user clicked the icon; that is, application A is in a warm start. When application A is in a warm start, if no other Activity besides Activity1 needs to be created, the system first displays snapshot1. See [link to example]. Figure 4 (a) in the middle.

[0161] It needs to be explained that, Figure 4 In (a) above, snapshot1 is a system-compiled snapshot and status bar. If the previously saved snapshot is an image corresponding to the interface of application A (excluding the status bar), then the displayed snapshot1 is a system-compiled snapshot layer and status bar layer. If the previously saved snapshot is an image corresponding to the interface currently displayed on the electronic device (including the status bar), then the displayed snapshot1 is the interface after the system overlays the snapshot layer with the status bar layer.

[0162] In this embodiment, a snapshot of the application saved before it is pushed back to the background is recorded as the second image. In this embodiment, a snapshot displayed when the application is restarted is recorded as the first image. Since the saved snapshot (second image) may or may not include the status bar (the content of the status bar at the time of the screenshot), and the displayed snapshot (first image) is an image excluding the status bar, when the electronic device displays the first image, it needs to composite the saved second image and the current status bar content, or cover the status bar area of ​​the second image with the current status bar content.

[0163] As another example, the electronic device can also take a screenshot of the second image to obtain a first image that includes the first interface of the first application but does not include the status bar content (the status bar content at the time of the screenshot). Then, when the electronic device displays the first image, it combines the first image with the current status bar content of the electronic device.

[0164] During the display of snapshot 1, the system resumes Activity 1, obtains the corresponding interface 1 for Activity 1, and after obtaining the corresponding interface 1, the electronic device changes from displaying snapshot 1 to displaying interface 1. See [link / reference] Figure 4 (b) in the middle.

[0165] As mentioned earlier, since snapshot1 is a snapshot of the interface corresponding to Activity1 of application A, and interface 1 is the interface corresponding to Activity1 of application A, therefore, Figure 4 (a) and Figure 4 The interface displayed by the electronic device in (b) is the same.

[0166] based on Figure 3 (c) Figure 3 (d) Figure 3 (e) in Figure 4 (a) and Figure 4 As shown in (b), at the start of a warm start of application A, if the process of application A only needs to resume an Activity (e.g., Activity1) and does not need to create other Activities, then the Activity changes and window changes of the electronic device can be seen in [reference]. Figure 4 The timeline is shown in (c). Starting from the moment of a warm start, the electronic device first draws snapshot 1. During snapshot 1 drawing, the electronic device displays the original interface where the icon of application A is located (e.g., the system desktop). After snapshot 1 is drawn, the electronic device changes from displaying the system desktop to displaying snapshot 1. During the display of snapshot 1, the process of application A resumes Activity 1. Upon obtaining interface 1 corresponding to Activity 1, the electronic device changes from displaying snapshot 1 to displaying interface 1. From the user's perspective, the user perceives the application A's startup response time as the time from when the user clicks the application A's icon (which can be considered equivalent to the warm start moment) to when the electronic device displays snapshot 1. Since snapshot 1 is in image format, drawing snapshot 1 in this image format typically takes less time. From the user's perspective, the application startup response is fast, improving the user experience.

[0167] See Figures 5 to 6 This is another application scenario provided by the embodiments of this application. Figure 5 In scenario (a), the electronic device displays the system desktop, and the user clicks the icon of application A (e.g., a video application) on the system desktop. At this time, there is no process for application A in the system background, i.e., application A is in a cold start.

[0168] During the cold start process of application A, the system first creates a process for application A. After the process is created, the application A process starts the main activity of application A and draws the corresponding interface. In practical applications, the application A process can also be created first, and after the application A process starts, the advertising activity can be created through the application A process, and the corresponding interface of the advertising activity can be obtained and displayed. See [link to relevant documentation]. Figure 5 In the case shown in (b), during the process of displaying the advertising interface corresponding to the advertising Activity, the main Activity of application A is launched through the process of application A and the interface corresponding to the main Activity is drawn.

[0169] Similarly, in the process of creating a process for application A, creating an advertising Activity through that process, and obtaining the corresponding interface for the advertising Activity, it is also possible to add... Figure 3 and Figure 4 The animation effects described in the illustrated embodiments will not be repeated here.

[0170] See Figure 5 In (c), after the process of application A draws the interface corresponding to the main Activity, the electronic device changes from displaying the advertisement interface to displaying the interface corresponding to the main Activity.

[0171] On electronic device display Figure 5 Following the interface of application A (e.g., a video application) shown in (c), the user swipes up from the bottom of the screen to bring the application from the foreground to the background and cause the electronic device to display... Figure 5 The system desktop is shown in (d) above. For ease of description, the interface displayed on the electronic device before the application moves from the foreground to the background is denoted as Interface 1, and the Activity corresponding to Interface 1 is denoted as Activity1. Before the application moves from the foreground to the background, Interface 1 corresponding to Activity1 is saved as a snapshot (snapshot1).

[0172] Users Figure 5 Clicking the icon of application A on the system desktop shown in (d) requires attention. It should be noted that on the electronic device display... Figure 5 The time between the interface shown in (d) and the user clicking the icon of application A on the interface can be relatively short. During this time, the user can also perform other operations on the electronic device, such as clicking the icon of application B (an application other than application A on the electronic device) to bring application B to the foreground. After application B returns to the background, the electronic device displays the system desktop.

[0173] Before the user clicks the icon of application A, the process of application A is not destroyed, meaning application A is in a warm start. When application A is warm started, since an advertising interface is pre-set for application A, Activity 0 needs to be created before resuming Activity 1. In this embodiment, Activity 0 is a pre-set advertising Activity. In actual applications, the developer of application A can set that application A creates Activity 0 every time it starts, and can display the advertising interface corresponding to Activity 0 during a cold start, or not display the advertising interface corresponding to Activity 0 during a warm start. The specific setting can be determined by the developer of application A.

[0174] During application startup, if an Activity is created, to prevent discrepancies between the newly created Activity's interface and the snapshot saved when the application was last brought to the background, the electronic device's system typically disables the snapshot process. This means that a snapshot of the application's last screen saved when it was last brought to the background is no longer displayed.

[0175] To avoid frequent ad displays and a degraded user experience, the developers of application A might configure the app to not display the ad interface corresponding to Activity 0 during the app's warm-start phase. That is, application A's process can create Activity 0, but the ad interface corresponding to Activity 0 will not be displayed. Then, after the user clicks the application A icon to initiate a warm-start, the electronic device will display the original screen (system desktop) where the application A icon was displayed when the user clicked it. See [link to relevant documentation]. Figure 6 In (a), during the process of displaying the original interface where the icon of application A is located, the process of application A creates Activity0 and resumes Activity1.

[0176] See Figure 6 In (b), the interface 1 corresponding to Activity1 obtained after resuming Activity1 is shown.

[0177] Reference Figure 6 In scenario (c), when application A is warm-started and an Activity is created, regardless of whether the ad page is displayed or not... Figure 6 (c) Taking the example of not displaying the advertising interface, the system desktop is displayed from the time the user clicks the icon of application A until the electronic device displays the interface 1 corresponding to Activity1. From the user's perspective, the application's startup response speed is slow.

[0178] To solve the above problem, when it is necessary to create other Activities during application warm-start, you can follow the steps above. Figure 7 The aforementioned display logic describes the interface display process during a warm start.

[0179] See Figure 7 Electronic devices in display Figure 7 Before (a) in the middle, with Figure 5 (a) to Figure 5 The scenario shown in (d) is the same. See also: [link to details] Figure 5 (a) to Figure 5 The relevant description of (d) in the text will not be repeated here.

[0180] Figure 7 In the application scenario shown, upon application startup, the following logic is added: It checks whether the application currently switched to the foreground is a hot start; whether a snapshot was saved when the application was switched to the background; whether the Activity corresponding to the snapshot's interface has not been destroyed (to avoid discrepancies between the interface displayed by application A after a hot start and the snapshot content); and whether the application creates other Activities while displaying the interface from the last time it was switched to the background. If all of the above checks are true, the following is forcibly executed:

[0181] When the application starts, the system first draws and displays a snapshot (snapshot1), see [link / reference]. Figure 7 The interface shown in (a) is also mentioned. See also: Figure 7 In step (c), during the process of drawing the snapshot (snapshot1), the electronic device displays the interface where the icon of application A is located (e.g., the system desktop). After the electronic device completes drawing the snapshot (snapshot1), the window of the electronic device changes from displaying the system desktop to displaying snapshot1. During the display of snapshot1, the process of application A creates Activity1 and resumes Activity1. After resuming Activity1, it obtains the interface 1 corresponding to Activity1. After obtaining interface 1, the system will change from displaying snapshot (snapshot1) to displaying interface 1. See [link to documentation]. Figure 7 The interface shown in (b) is shown in the image.

[0182] Figure 7 The process of application hot start can also be understood as follows: when the application is hot started, if an Activity is created and the Activity corresponding to the snapshot is not destroyed, the saved snapshot is forced to be displayed during the Activity creation stage until the system gets the final display interface (the interface corresponding to the Activity at the top of the task stack before the application was last switched to the background).

[0183] It should be noted that the snapshot image of the interface corresponding to Activity1 of application A before application A was last brought to the background; when application A is launched, after the process of application A resumes Activity1, the interface displayed on the electronic device is the interface corresponding to Activity1. Theoretically, the content of the interface corresponding to Activity1 before application A was last brought to the background (or the snapshot image of the interface) and the content of the interface corresponding to Activity1 displayed after application A is launched this time are the same.

[0184] However, in practical applications, the interface displayed after application A launches (Activity 1) may differ from the content of a previously saved snapshot. For example, in a scenario where Activity 1 can dynamically display two (or more) images for swiping and switching, if the snapshot is taken at the exact moment of the image swiping and switching, the snapshot may display half of each image. After the application is launched again, the interface displayed on the electronic device may be the interface after the image swiping and switching within Activity 1. Of course, the interface corresponding to the snapshot and the interface after the electronic device launches are based on the same Activity. Therefore, the layout of the content in the snapshot and the content displayed on the interface after the electronic device launches are basically the same. Even if there are some differences in content, from the user's perspective, it is usually considered as the normal playback of animations in that interface.

[0185] Based on this understanding, if application A displays an interface before returning to the background, and then displays another interface upon returning to the foreground, and if both interfaces correspond to the same Activity, even if the content displayed on the two interfaces differs slightly, they can be considered the same interface. This is because typically one Activity corresponds to one interface. Since two interfaces are generated based on the same Activity, their basic frameworks are the same, and even if the specific content differs slightly, they still belong to the same interface.

[0186] The above embodiments are all illustrated using the example of application A being returned to the background when the main interface of application A is displayed on the electronic device. The embodiments of this application, through... Figure 8 and Figure 9 The following example illustrates how application A is pushed back to the background when the electronic device displays a non-main interface.

[0187] See Figure 8 , Figure 8 References (a) and (b) in the text Figure 5Taking (a) and (b) as examples, it can be understood that application A creates an Activity upon startup (e.g., the Activity corresponding to the advertisement screen). After the electronic device displays the advertisement screen for a period of time, the following steps are taken: Figure 8 The main interface of application A (interface 1 corresponding to Activity1) is shown in (c).

[0188] On electronic device display Figure 8 In the case of interface 1 shown in (c), when the user clicks the control in interface 1, the electronic device displays another interface, which is interface 2 corresponding to Activity 2 of application A.

[0189] See Figure 8 In the diagram, (d) represents interface 2 corresponding to Activity2 of application A displayed on the electronic device. If the user at this time... Figure 8 The gesture shown in (d) returns to the system desktop, and the electronic device displays... Figure 8 The system desktop is shown in (e) above. Of course, electronic devices display... Figure 8 Before the system desktop shown in (e), the electronic device saves a snapshot (snapshot2) of the interface 2 corresponding to Activity2 as application A.

[0190] exist Figure 8 In the interface shown in (e), if the user clicks the icon of application A on the system desktop, the system adds the following judgment logic: It checks whether the application currently switched to the foreground is a hot start; whether a snapshot was saved when the application was switched to the background; whether the Activity corresponding to the snapshot of the application has not been destroyed; and whether the application creates other Activities while displaying the interface from the last time it was switched to the background. If all of the above judgment logic is true, the following content is forcibly executed:

[0191] See Figure 9 The interface shown in (a) shows that when application A starts, the system first draws and displays a snapshot (snapshot2). See also... Figure 9In step (c), during the process of drawing snapshot 2, the electronic device displays the interface where the icon of application A is located (e.g., the system desktop). After the electronic device completes drawing snapshot 2, the window of the electronic device changes from displaying the system desktop to displaying snapshot 2. During the display of snapshot 2, the process of application A creates Activity 0 and resumes Activity 2. After resuming Activity 2, it obtains interface 2 corresponding to Activity 2. After obtaining interface 2, the system will change from displaying snapshot 2 to displaying interface 2. For details, please refer to [link to documentation]. Figure 9 The interface shown in (b) is shown in the image.

[0192] To provide a clearer understanding of the embodiments shown above, please refer to... Figure 10 The technical architecture diagram shown is as follows. The technical architecture diagram provided in this application embodiment includes an application layer and a framework layer. Figure 10 The technical architecture shown is just one example; in practical applications, it can include even more advanced technologies. Figure 10 The diagram shows more layers, and each layer can contain more than [a certain number of layers]. Figure 10 The components shown are more components.

[0193] The application layer contains a variety of applications. For example, in the application scenario above, application A also includes a desktop launcher. The desktop launcher is used to manage system desktops, such as starting or stopping the system desktop.

[0194] The framework layer contains navigation components, activity management components (ActivityManagerServer, AMS), and window management components.

[0195] The navigation component can be implemented in various ways, such as gesture navigation, floating navigation, and three-button navigation, as described in the following embodiments.

[0196] The activity management component includes: ActivityTaskManagerService (ATMS) and Activity record.

[0197] ATMS is used to handle tasks such as launching, switching, and scheduling Activities.

[0198] The Activity record stores information about the Activity, such as its state.

[0199] AMS is used to manage the lifecycle of application Activities. Taking some lifecycle states as an example: When an Activity is opened for the first time after a cold start, it is initially in the `on create` state; when the application switches from the foreground to the background, the Activity enters the `on stop` state, in which the corresponding screen is not visible; when the Activity is reopened, it first enters the `on resume` state; when the Activity is switched out, it can enter the `on destroy` state to complete its destruction, in which case the Activity is not visible; if the Activity is restarted, it re-enters the `on create` state.

[0200] The window management components include: Snapshot, Snapshotcache, and WMS.

[0201] Snapshot is used to display the interface of an Activity, and also to perform a snapshot of the last screen displayed before the application is switched to the background, and to display that snapshot.

[0202] Snapshotcache is used to cache snapshots of the last screen displayed before the application switches to the background, obtained by the Snapshot module.

[0203] WMS is used to draw windows (e.g., interfaces, snapshots of interfaces).

[0204] This application embodiment adds a SnapshotConcurrent module (SC module) to the window management component. The SC module is used to determine whether the application meets the following conditions (or all of them) when the application starts. If the conditions are met or all of them are met, the snapshot display process of the application is forcibly executed.

[0205] As an example of an SC module, when an application is warm-started, it is determined whether the application meets the following conditions:

[0206] (1) Determine whether the application currently switched to the foreground is a hot start.

[0207] (2) The Activity corresponding to the snapshot stored before the application was switched to the background was not destroyed when the application was launched.

[0208] (3) Whether the application creates an Activity during startup.

[0209] If the above conditions are met, a snapshot of the application is first drawn, and once the snapshot is drawn, it is displayed.

[0210] When displaying a snapshot of the application, the application process creates Activity0 and resumes Activity1. After the interface corresponding to Activity1 is drawn, it is displayed.

[0211] In this embodiment of the application, the application process can also start createActivity0 while drawing a snapshot of the application.

[0212] In the example above, because the snapshot is in image format, the system doesn't require complex drawing logic compared to the interface corresponding to Activity1. Therefore, the electronic device responds faster when displaying the snapshot than when displaying the interface. From the user's perspective, the application launches more quickly. Of course, the content of interface 1 corresponding to Activity1 is consistent with the snapshot (where interface 1 is generated). Therefore, the user is unaware of the process of the electronic device switching from displaying the snapshot to displaying interface 1 after the interface 1 corresponding to Activity1 has been drawn, thus improving the user experience.

[0213] It should be noted that in the above embodiments, the electronic device first displays a snapshot. However, before displaying the snapshot, it also needs to be drawn. Therefore, during the snapshot drawing process, the electronic device will display the original interface (e.g., the system desktop where the icon of application A is located) for a period of time. The length of this period depends on the length of the snapshot drawing process. Usually, the snapshot drawing process is relatively short, and it can be considered that after the user clicks the application icon, the electronic device first displays the snapshot.

[0214] The following will be through Figure 11 The timing diagram shown describes the application startup method. This method includes the following steps:

[0215] In step B1, the navigation component detects information indicating a return to the system desktop.

[0216] The electronic device system contains a navigation component that can detect information to return to the system desktop when the user triggers the electronic device to display the system desktop through various gestures.

[0217] As an example, a user triggers the display of the system desktop on an electronic device by using gesture navigation (e.g., the user swipes their finger up from the bottom of the screen); or, a user triggers the display of the system desktop on an electronic device by using floating navigation (e.g., the user taps a floating ball button displayed on the screen); or, a user triggers the display of the system desktop on an electronic device by using three-button navigation (e.g., the user taps the "Return to Home" button in the three-button navigation).

[0218] Figure 5The gesture shown in (c) can trigger the navigation component to detect information to return to the system desktop.

[0219] This embodiment of the application takes the example of an electronic device displaying the system desktop after a user triggers application A to return to the background via gesture navigation. In practical applications, after application A returns to the background, the electronic device can display other interfaces besides the system desktop. After the user performs operations on other interfaces, they can return to the system desktop.

[0220] As an example, a user triggers a side navigation bar on an electronic device using a gesture. This side navigation bar is a floating interface that appears on the side of the electronic device and includes icons for multiple applications. If the user clicks on the icon for application B in the side navigation bar, the electronic device switches application A from the foreground to the background, and the electronic device displays the interface for application B. With application B's interface displayed, the user can then trigger the electronic device to return to the system desktop.

[0221] The examples above all use user gestures on an electronic device's touchscreen to trigger the switching of applications to the background. In practical applications, applications can also be switched from foreground to background using voice commands or air gestures.

[0222] As an example, if the user sends a voice message "return to the system desktop" while the electronic device is displaying the interface of application A, the electronic device will switch application A to the background and display the system desktop.

[0223] If the application continues to issue the voice message "Open application B", the electronic device will display the interface of application B; if the user then issues the voice message "Return to system desktop", the electronic device will switch application A to the system background and the electronic device will display the system desktop.

[0224] This application does not limit the triggering method for an application to run from the foreground to the background. It also does not limit the interface displayed on the electronic device after the application runs in the background. Furthermore, it does not limit user operations on the electronic device during the period between when application A returns to the background and when application A is restarted.

[0225] In step B2, after the navigation component detects the information indicating a return to the system desktop, it sends a message to ATMS to notify ATMS that it will return to the system desktop.

[0226] After receiving the information sent by the navigation component to return to the system desktop, ATMS needs to save a snapshot of the last screen displayed by the application running in the foreground of the electronic device (see steps B3 to B6), and stop the application currently running in the foreground of the electronic device (see steps B7 to B8).

[0227] In step B3, after receiving the information sent by the navigation component to return to the system desktop, ATMS sends a message to snapshot, which instructs snapshot to save a snapshot of the application currently running in the foreground of the electronic device.

[0228] In step B4, after receiving the information sent by ATMS indicating that a snapshot of the application currently running in the foreground of the electronic device is saved, snapshot takes a screenshot of the application currently running in the foreground of the electronic device to obtain a snapshot of the interface currently displayed by the application running in the foreground of the electronic device.

[0229] As an example, if the application currently running in the foreground of the electronic device is application A, then snapshot will take a screenshot of the interface currently displayed by application A to obtain a snapshot of the interface currently displayed by application A.

[0230] It should be noted that the snapshot obtained at this time is not a screenshot of the content currently displayed on the electronic device's screen, but rather an image snapshot of the interface currently displayed by application A on the electronic device. This image snapshot may include the interface content of application A, but may exclude system interface content (e.g., the status bar).

[0231] The snapshot obtained in this step can correspond to Figure 5 Interface 1 in application A (excluding the content corresponding to the status bar) is shown in (c).

[0232] Step B5: After obtaining the application snapshot, the snapshot is cached in snapshotcache.

[0233] In step B6, after successfully caching the obtained application snapshot in snapshotcache, snapshot sends a message to ATMS indicating that the application snapshot has been successfully saved.

[0234] In step B7, after receiving the information sent by the navigation component to return to the system desktop, ATMS sends a stop message to the application (application A) currently running in the foreground of the electronic device.

[0235] In step B8, after receiving the message, the application currently running in the foreground of the electronic device stops running and sends a message to ATMS indicating that the application has stopped running.

[0236] It should be noted that, in order to ensure that a snapshot of the electronic device currently running in the foreground is obtained, step B7 can be executed some time after step B3, or after step B6. This application embodiment does not impose any limitations on this.

[0237] In step B9, after receiving a message from the foreground application (application A) of the electronic device that it has stopped running and a message that the snapshot of the application has been successfully saved, ATMS can store the process object of the application.

[0238] The application's process object represents the state of the application's process. For example, if the identifier corresponding to the application's process object is the first identifier (e.g., 1), it indicates that the application's process exists; if the identifier is the second identifier (e.g., 0), it indicates that the application's process does not exist (has been destroyed). ATMS stores the application's process object with the first identifier. When the application's process object is destroyed or the application is terminated (when the application is terminated, its process is naturally destroyed), the first identifier will be updated to the second identifier.

[0239] The first and second identifiers are for illustrative purposes only. In actual applications, the second identifier can also be null.

[0240] In step B10, ATMS sends the latest status of Activity1 of application A to the Activity record to update the status of Activity1 of application A stored in the Activity record.

[0241] As an example, such as Figure 5 As shown in (c), the Activity at the top of application A's task stack is Activity1. ATMS includes a task stack, and ATMS can determine that the Activity at the top of application A's task stack is Activity1 from the application A's task stack, and then send the state of Activity1 (on Pause or on Stop) to the Activity record. Of course, when the state of Activity1 in application A is destroyed, the state of Activity1 recorded in the Activity record will be updated to on destroy.

[0242] After step B10, the Activity record will store the state of Activity1.

[0243] In step B11, after ATMS sends the state of Activity1 of application A to the Activity record, it sends a message to the desktop launcher indicating that the system desktop is open. This message can instruct the electronic device's display to show the system desktop.

[0244] In step B12, after receiving the message from ATMS indicating that the system desktop has been enabled, the desktop launcher displays the system desktop on the screen of the electronic device and sends a message back to ATMS indicating that the system desktop has been enabled.

[0245] After this step, the electronic device displays... Figure 5 The interface shown in (d) is the screen of the electronic device that displays the system desktop.

[0246] Of course, users can also click on application A's icon on the system desktop to relaunch application A. Since application A only stays in the background for a short time after returning from the foreground, this is usually a warm start for application A.

[0247] Of course, this embodiment of the application illustrates the scenario where application A has been moved from the foreground to the background, and the electronic device displays the system desktop, and then application A is restarted. In practical applications, users can also perform other operations on the electronic device's system desktop after application A has been moved from the foreground to the background to access other interfaces, and then return to the electronic device's system desktop to click on application A's icon to launch application A.

[0248] Step B13: The desktop launcher detects the operation to launch application A.

[0249] This application's embodiments focus on describing a hot-start scenario for application A, which could be a scenario where a user clicks the application icon on the system desktop to launch the application, for example... Figure 5 (d) In this scenario, the desktop launcher detects the operation of launching application A.

[0250] Of course, in practical applications, it could also be a scenario where users jump to application A from another application to warm-launch application A. In this scenario, the other applications can also detect the operation of launching application A. Alternatively, it could be a scenario where the user warm-launches application A by clicking a widget on the system desktop. In this scenario, the widget can detect the operation of launching application A.

[0251] See Figure 12 In example (a), the scenario is a jump from another application to application A to launch application A. In this scenario, the electronic device displays the interface of another application (e.g., application B), which includes a jump control for application A. The user clicks the jump control for application A, application B detects the operation to launch application A, and the electronic device launches application A.

[0252] See Figure 12 (b) illustrates a scenario where the user launches application A by clicking a widget on the system desktop. When the user clicks the widget, the widget can detect the action of launching application A.

[0253] In step B14, after the desktop launcher detects the operation to launch application A, it sends a command to ATMS indicating that application A has been launched. This command may carry a unique identifier for application A. This unique identifier may be the package name of application A.

[0254] In step B15, after receiving the instruction from the desktop launcher indicating the launch of application A, ATMS obtains the launch parameters for application A: create Activity0, with the target Activity being Activity1, and sends these launch parameters to the SC module. These launch parameters can also be referred to as launch information.

[0255] Here, Activity0 can be an advertising Activity added by the developer of application A when application A starts; of course, it could also be any other Activity that needs to be created when application A starts. The target Activity is the Activity that remained at the top of the task stack before application A was last put into the background.

[0256] After receiving the startup parameters for application A from ATMS, the SC module can determine whether application A meets the judgment logic described in the above embodiment. When making this judgment, the SC module first determines that the currently launched application is application A based on the received application identifier. Then, it checks whether three conditions are met (or whether all three are yes). The execution order of the three judgment steps is not important, and this application does not restrict the order of the three judgment steps. Of course, if the result of any judgment step is no, the SC module may not execute subsequent judgment steps, but instead execute the original startup process of application A set by the developer and system of application A.

[0257] In this embodiment, it can be first determined whether application A has created other Activities, then it can be determined whether the application is currently in a hot start, and finally it can be determined whether the target Activity has not been destroyed. See steps B16 to B22 for details.

[0258] In step B16, the SC module determines whether there is a behavior of creating other Activities based on the startup parameters received from application A (determined by the startup parameter create Activity0).

[0259] In step B17, the SC module obtains the process object of application A from ATMS (which can be obtained through the application's unique identifier).

[0260] In step B18, the SC module obtains the process object of application A from ATMS.

[0261] As mentioned earlier, the identifier in the process object of application A can determine whether the process of application A still exists in the system. If the identifier of the process object is the first identifier, it means that the process of application A still exists in the system, and it can be determined that application A is currently in a warm start.

[0262] In step B19, the SC module determines that application A is a hot start based on the obtained process object of application A.

[0263] In this step, the SC module obtains the process object of application A as "1". Based on the description of the process object in step B9, the SC module determines that application A is a hot start based on the content (1) of the obtained process object of application A.

[0264] In step B20, the SC module obtains the state of the target Activity (Activity1) from the Activity record.

[0265] In step B21, the SC module obtains the state of the target Activity (Activity1) from the Activity record.

[0266] As mentioned earlier, the Activity record stores the state of the Activity. If the state of Activity1 is not destroyed, then it is determined that Activity1 has not been destroyed.

[0267] In step B22, the SC module determines that Activity1 has not been destroyed based on the state of the target Activity (Activity1).

[0268] After steps B16 to B22, it can be determined that application A meets the conditions corresponding to the above three judgment steps (or the judgment results are all yes).

[0269] Step B23: After determining in steps B16 to B22 that application A meets the conditions corresponding to the above three judgment steps, send information to ATMS to execute and display a snapshot of application A.

[0270] Of course, if application A does not meet the conditions corresponding to the above three judgment steps (any one of the conditions is judged as no), the startup process of application A executes the original startup logic set by the developer of application A for application A. The original startup logic can be specifically referred to in the description of the above embodiments.

[0271] In step B24, after ATMS receives the information sent by the SC module for executing the snapshot of application A, it sends the information for adding the snapshot of application A to ActivityRecord.

[0272] In step B25, after receiving the information from ATMS regarding adding a snapshot of application A, ActivityRecord sends the same information to snapshot.

[0273] In step B26, after receiving the information for adding a snapshot of application A, snapshot of application A is retrieved from snapshotcache. This snapshot is the snapshot of application A stored in step B5.

[0274] Step B27: Snapshot obtains a snapshot of application A from the snapshot cache.

[0275] In this embodiment of the application, the information transmitted in steps B24 to B26 may carry the identifier of application A and the identifier of activity1. This allows for the creation of a snapshot corresponding to activity1 of application A using the identifiers of application A and activity1.

[0276] In step B28, after obtaining a snapshot of application A from the snapshot cache, snapshot of application A is sent to WMS.

[0277] Step B29: After successfully sending the snapshot to WMS, a message indicating that application A's snapshot has been successfully added is sent to ActivityRecord.

[0278] In step B30, after receiving the message from snapshot indicating that application A has been successfully added, ActivityRecord sends a message to ATMS indicating that application A has been successfully added.

[0279] In step B31, after ATMS receives the message indicating that the snapshot of application A has been successfully added, it first sends an instruction to the snapshot, which instructs the snapshot to perform the application startup effect.

[0280] In step B32, after receiving the instruction from ATMS to indicate the application startup effect, snapshot sends an instruction to WMS to draw a snapshot.

[0281] In step B33, after receiving the snapshot drawing instruction sent by snapshot, WMS draws a snapshot of application A based on the previously received snapshot, and displays the snapshot of application A after successful drawing.

[0282] It should be noted that in this embodiment, the snapshot caching and transmission processes performed by the electronic device store snapshot-related information, such as a bitmap. When drawing a snapshot of application A, WMS draws the snapshot based on the previously received snapshot-related information.

[0283] Of course, the drawing and display process is not entirely WMS drawing and display, but WMS performs drawing, rendering, and display tasks by calling other modules.

[0284] It should be noted that drawing a snapshot of application A also takes time, so Figure 7 (c) shows that after the start of a warm boot, the window on the electronic device maintains the original interface (system desktop) where application A is located while a snapshot of application A is drawn. After a snapshot (snapshot1) of application A is drawn, the window on the electronic device displays the snapshot (snapshot1) of application A.

[0285] See Figure 7 (a) in the image is a snapshot of application A displayed on the electronic device. (By...) Figure 7 The time (8:01) displayed in the upper right corner of the interface shown in (a) is... Figure 5 The time (8:00) displayed in the upper right corner of the interface shown in (c) can be understood as follows: when the application returns to the background from the foreground, the snapshot of the application does not include the taskbar (i.e., it is not a screenshot of the electronic device screen), and the snapshot saved is a snapshot of the interface content of application A.

[0286] In step B34, after ATMS completes step B30, it also needs to send a message to the desktop launcher to stop the system desktop, so that the electronic device stops running the system desktop.

[0287] Step B35: After the desktop launcher stops running, send a message to ATMS indicating that the system desktop has stopped running.

[0288] In this embodiment, step B30 is executed after step B29, rather than after step B33. This is because, under heavy system load or busy conditions, the execution time of steps B30 and B31 may be delayed. If the delay extends to after step B37, the system determines that Activity1 has been obtained and will not execute the steps of drawing and displaying the snapshot. Therefore, in this embodiment, step B30 is set before step B32.

[0289] In step B36, after ATMS receives the message from the desktop launcher indicating that the system main interface has stopped, it sends a startup message to application A.

[0290] The subsequent steps will launch application A according to the application A's settings and the system's defined application launch process. See steps B35 to B43 for details. It should be noted that steps B35 to B43 are merely examples; in actual implementation, other forms of application launch processes may exist, which will not be exemplified here.

[0291] Step B37: After receiving the startup message, application A creates Activity0 through its process.

[0292] Step B38: After creating Activity0 in the process of application A, resumeActivity1 in the process of application A.

[0293] Step B39: After the process of application A resumes Activity1, a message indicating the addition of the interface for Activity1 is sent to ATMS. This message may carry the display parameters of the interface 1 corresponding to Activity1.

[0294] In step B40, after receiving the message from application A indicating the addition of the interface for Activity1, ATMS sends a message to WMS indicating the addition of the interface corresponding to Activity1. This message may also carry the display parameters of interface 1 corresponding to Activity1.

[0295] In step B41, after receiving the display parameters of the interface corresponding to Activity1, WMS returns a message of successful addition to ATMS.

[0296] In the actual implementation, after WMS receives the display parameters of the interface 1 corresponding to Activity1, it indicates that the interface of Activity1 has been successfully added, and returns a message of successful addition to ATMS.

[0297] In step B42, after ATMS receives the message from snapshot that the interface of Activity1 has been successfully added, it returns a message to application A that the interface of Activity1 has been successfully added.

[0298] In step B43, after receiving the message that the interface of Activity1 has been successfully added, application A sends a message to ATMS indicating that Activity1 has resumed successfully.

[0299] In step B44, after ATMS receives the Activity1 resume completion message sent by application A, it sends an instruction to WMS, which is used to instruct WMS to perform the startup effect.

[0300] In step B45, after receiving the instruction from ATMS, WMS draws and displays the interface 1 corresponding to Activity1 based on the previously obtained display parameters of Activity1's interface.

[0301] After this step, the electronic device will display Figure 7 Interface 1 is shown in (b) above. Since the electronic device can pre-display snapshot 1, Activity 0 can be created and Activity 1 can be resumed during the display of snapshot 1 until interface 1 corresponding to Activity 1 is obtained. The content of interface 1 is the same as that of snapshot 1. From the user's perspective, the startup response speed of application A is considered to be faster, thereby improving the user experience.

[0302] This application uses Activity0 as an advertising Activity as an example for illustration. In practical applications, when determining whether the conditions for creating an Activity exist, the behavior of creating any one or more Activities is applicable to this application embodiment. That is, Activity0 in create Activity0 is not necessarily limited to an advertising Activity, but can also be other Activities, such as a blank Activity (an Activity without a screen), a white page Activity (an Activity displaying a white screen), etc.

[0303] In this embodiment, although the application developer configures the application to execute a snapshot process during a hot start, the electronic device's system, to avoid a poor user experience due to inconsistencies between the snapshot's content and the final content displayed after the application starts when a "create Activity" action occurs, has a mechanism in place that invalidates the snapshot process during a hot start. Figure 5 and Figure 6 The illustrated embodiment. After the snapshot process fails, from the user's perspective, the application's response speed is slow, resulting in a poor user experience. This embodiment of the application can resolve the problem of conflict between application settings and system settings, which leads to the user perceiving a slow application startup response rate. When it is determined that the application startup meets the three logical judgment conditions provided in this embodiment (or all of them are true), the snapshot process is forcibly executed, thereby improving the application startup response speed and enhancing the user experience from the user's perspective.

[0304] As another embodiment, Figure 13 This is a flowchart illustrating an embodiment of the present application.

[0305] Step 1301: The electronic device displays the first interface of the first application.

[0306] The first application is any application software installed on the electronic device. The first interface is any interface displayed when the first application is running in the foreground.

[0307] Step 1302: The electronic device receives the first operation input by the user.

[0308] Step 1303: In response to the first operation, the electronic device switches the first application to run in the background.

[0309] The first operation is any operation that switches an application to the background, such as returning to the system desktop (system main interface); bringing up the multitasking card and clicking on the task card of an application other than the first application in the multitasking card; clicking on the icons of applications other than the first application in the side navigation bar of the electronic device; clicking on the notification messages of applications other than the first application at the top of the electronic device; other operations will not be listed one by one.

[0310] Step 1304: The electronic device receives a second operation input by the user.

[0311] The second operation can be the operation in step B13 above and... Figure 12 Any of the operations shown.

[0312] Step 1305, in response to the second operation, the electronic device launches the first application.

[0313] Step 1306: During the startup of the first application, if the first application meets the preset conditions, the electronic device displays the first image, wherein the first image is related to the first interface, and the preset conditions include: the process of the first application has not ended, the first activity corresponding to the first interface has not been destroyed, and the first application needs to create a second activity when it starts.

[0314] The fact that the process has not ended indicates that the process still exists in the system. The fact that the first activity corresponding to the first interface has not been destroyed indicates that the first activity is not in a destroyed state. The second activity can be any activity other than the first activity. For example, as mentioned above, the advertising activity can also be a blank activity (an activity that displays a completely white interface), or it can be the application's logo activity.

[0315] Step 1307: After the electronic device resumes its first activity, it displays the first interface.

[0316] The first activity is the target Activity, and the first screen is the screen corresponding to the target Activity. The first screen is also the last screen displayed before the electronic device returns to the background.

[0317] In addition, before step 1303, the user can perform other operations on the electronic device to open other applications and then return to the system desktop.

[0318] As an example, the electronic device receives a third operation input by the user; in response to the third operation, the electronic device launches a second application and displays a second interface of the second application.

[0319] The third operation is to launch any second application, such as clicking the icon of the second application on the system desktop.

[0320] Of course, it could also be an action like bringing up the multitasking card and clicking the second application's task card from the multitasking card, or clicking the second application's icon from the side navigation bar. The second interface of the second application can be the main interface of the second application, or it can be the interface that was displayed before the second application was last run in the background.

[0321] It should be understood that the sequence number of each step in the above embodiments does not imply the order of execution. The execution order of each process should be determined by its function and internal logic, and should not constitute any limitation on the implementation process of the embodiments of this application.

[0322] This application also provides a computer-readable storage medium storing a computer program, which, when executed by a processor, can implement the steps in the above-described method embodiments.

[0323] This application also provides a computer program product that, when run on a first device, enables the first device to implement the steps described in the various method embodiments above.

[0324] If the integrated unit is implemented as a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, all or part of the processes in the methods of the above embodiments of this application can be implemented by a computer program instructing related hardware. The computer program can be stored in a computer-readable storage medium, and when executed by a processor, it can implement the steps of the various method embodiments described above. The computer program includes computer program code, which can be in the form of source code, object code, executable files, or certain intermediate forms. The computer-readable medium can include at least: any entity or device capable of carrying the computer program code to the first device, a recording medium, a computer memory, a read-only memory (ROM), a random access memory (RAM), an electrical carrier signal, a telecommunication signal, and a software distribution medium. Examples include USB flash drives, portable hard drives, magnetic disks, or optical disks. In some jurisdictions, according to legislation and patent practice, computer-readable media cannot be electrical carrier signals or telecommunication signals.

[0325] This application also provides a chip system, which includes a processor coupled to a memory. The processor executes a computer program stored in the memory to implement the steps of any method embodiment of this application. The chip system can be a single chip or a chip module composed of multiple chips.

[0326] In the above embodiments, the descriptions of each embodiment have different focuses. For parts that are not described in detail or recorded in a certain embodiment, please refer to the relevant descriptions of other embodiments.

[0327] Those skilled in the art will recognize that the units and method steps of the various examples described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, or a combination of computer software and electronic hardware. Whether these functions are implemented in hardware or software depends on the specific application and design constraints of the technical solution. Those skilled in the art can use different methods to implement the described functions for each specific application, but such implementation should not be considered beyond the scope of this application.

[0328] The above embodiments are only used to illustrate the technical solutions of this application, and are not intended to limit them. Although this application has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that modifications can still be made to the technical solutions described in the foregoing embodiments, or equivalent substitutions can be made to some of the technical features. Such modifications or substitutions do not cause the essence of the corresponding technical solutions to deviate from the spirit and scope of the technical solutions of the embodiments of this application, and should all be included within the protection scope of this application.

Claims

1. An application launch method, characterized in that, Applied to electronic devices, the method includes: Displaying the system desktop, wherein the system desktop includes a first icon of a first application; In response to a user’s first operation on the first icon, a first interface of the first activity of the first application is displayed, and the first interface is an advertisement interface. After displaying the first interface, a second interface of the second activity of the first application is displayed, and the second interface is the main interface; In response to a second operation by the user on the second interface, a third interface of the third activity of the first application is displayed, the third interface being different from the second interface; In response to the user's third action, the system desktop is displayed, and the first application enters the background; In response to a user’s fourth operation on the first icon, a fourth activity of the first application is created. After the fourth activity is created, the third activity is restored. When the fourth activity is created and when the third activity is restored, a first image is displayed. The first image is a snapshot of the third interface. After displaying the first image, the fourth interface of the third activity is displayed.

2. The method of claim 1, further comprising: After the third activity is resumed, the fourth interface is displayed.

3. The method as described in claim 1, characterized in that: The third interface is generated based on the third activity, and the fourth interface is generated based on the third activity.

4. The method as described in claim 1, characterized in that: The content of the third interface and the fourth interface is basically the same.

5. The method as described in claim 1, characterized in that, Also includes: When the fourth activity is created, it is set to not display the advertising interface.

6. The method as described in claim 1, characterized in that, Also includes: The process of the first application is created before the fourth activity is created, and the third and fourth activities are created for the process of the first application.

7. The method as described in claim 1, characterized in that, The system desktop includes a second icon for the second application; The method further includes: in response to a sixth operation by the user on the second icon, displaying a sixth interface of the fifth activity of the second application; In response to the user's seventh action, the system desktop is displayed, and the second application enters the background; In response to the user's eighth operation on the second icon, the fifth activity is resumed and a second image is displayed, which is a snapshot of the sixth interface; After displaying the second image, the seventh interface of the fifth activity is displayed.

8. The method as described in claim 7, characterized in that, No activities were created before the fifth activity was resumed.

9. The method as described in claim 8, characterized in that, When the fifth activity is resumed, the second image is displayed; after the fifth activity is resumed, the seventh interface is displayed.

10. The method as described in claim 9, characterized in that: The sixth interface is generated based on the fifth activity, and the seventh interface is also generated based on the fifth activity; the content of the sixth interface and the seventh interface is basically the same.

11. The method as described in claim 7, characterized in that, The second image is a screenshot of the sixth interface of the fifth activity.

12. The method as described in claim 7, characterized in that, The second image does not include the status bar; It also includes: displaying the second image while simultaneously displaying the current status bar of the electronic device.

13. The method as described in claim 1, characterized in that, The first image is displayed in response to determining that the fourth activity has been created, the process of the first application exists, and the third activity has not been destroyed.

14. The method as described in claim 1, characterized in that, The first image is a screenshot of the third interface of the third activity.

15. The method as described in claim 1, characterized in that, The first image does not include the status bar.

16. The method as described in claim 1, characterized in that, Also includes: While the first image is being displayed, the status bar of the electronic device is also displayed.

17. The method as described in claim 1, characterized in that, The first image includes a status bar, and further includes: displaying the current status bar of the electronic device while displaying the first image, the first image is displayed on a first layer, the current status bar of the electronic device is displayed on a second layer, and the second layer is displayed on top of the first layer.

18. The method of claim 1, further comprising: In response to the user's ninth operation on the fourth interface, the seventh interface of the sixth activity of the first application is displayed; In response to the user's tenth action, the system desktop is displayed, and the first application enters the background; In response to the user's eleventh operation on the first icon, the seventh activity of the first application is created, the sixth activity is restored, and a third image is displayed, which is a snapshot of the seventh interface; After the third image is displayed, the eighth interface of the sixth activity is displayed, and the seventh interface is generated based on the sixth activity.

19. The method as described in claim 1, characterized in that, The electronic device includes an activity management component, a window management component, a desktop launcher, and a navigation component; It also includes: in response to the user's third operation, the navigation component sends first information to the activity management component, the first information instructing the activity management component to return to the system desktop; After receiving the first information, the activity management component sends the second information to the window management component; After receiving the second information, the window management component saves the first image; After saving the first image, the window management component sends third information to the first application. After receiving the third information, the first application stops running; After the first application stops running, the activity management component stores the identifier corresponding to the process of the first application and stores the state of the third activity; After storing the state of the third activity, the activity management component sends a fourth message to the desktop launcher; After receiving the fourth message, the desktop launcher displays the system desktop on the screen of the electronic device; In response to the fourth operation, the desktop launcher sends a fifth message to the activity management component; After receiving the fifth information, the activity management component sends the startup parameters of the first application to the window management component; After receiving the startup parameters of the first application, the window management component determines, based on the startup parameters, that the fourth activity has been created, the process of the first application exists, and the third activity has not been destroyed. The window management component sends a sixth message to the activity management component; After receiving the sixth information, the activity management component sends the seventh information to the window management component and the eighth information to the desktop launcher. After receiving the seventh information, the window management component displays the first image; After receiving the eighth message, the desktop launcher stops the system desktop. After the system desktop stops running, the desktop launcher sends a ninth message to the activity management component; After receiving the ninth message, the activity management component sends the tenth message to the first application. After receiving the tenth information, the first application creates the fourth activity; After the fourth activity is created, the first application resumes the third activity; After the third activity is restored, the first application sends the display parameters of the fourth interface to the activity management component; After receiving the display parameters of the fourth interface, the activity management component sends the display parameters of the fourth interface to the window management component. After receiving the display parameters of the fourth interface, the window management component displays the fourth interface.

20. An electronic device, characterized in that, The electronic device includes a processor for running a computer program stored in a memory to enable the electronic device to perform the method as described in any one of claims 1 to 19.

21. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores a computer program that, when run on a processor, implements the method as described in any one of claims 1 to 19.

22. A computer program product, characterized in that, When the computer program product is run on an electronic device, it causes the electronic device to perform the method as described in any one of claims 1 to 19.

Citation Information

Patent Citations

  • Method and device for controlling advertisement broadcasting based on application and terminal

    CN109005462A

  • Methods for launching applications with efficient user impression

    US20120311490A1