WO2023098202A1 - 应用启动方法、电子设备及可读存储介质 - Google Patents

应用启动方法、电子设备及可读存储介质 Download PDF

Info

Publication number
WO2023098202A1
WO2023098202A1 PCT/CN2022/117370 CN2022117370W WO2023098202A1 WO 2023098202 A1 WO2023098202 A1 WO 2023098202A1 CN 2022117370 W CN2022117370 W CN 2022117370W WO 2023098202 A1 WO2023098202 A1 WO 2023098202A1
Authority
WO
WIPO (PCT)
Prior art keywords
application
electronic device
activity
interface
image
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Ceased
Application number
PCT/CN2022/117370
Other languages
English (en)
French (fr)
Inventor
肖继伟
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Honor Device Co Ltd
Original Assignee
Honor Device Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Honor Device Co Ltd filed Critical Honor Device Co Ltd
Priority to CN202280090581.5A priority Critical patent/CN118661150B/zh
Priority to EP22879629.8A priority patent/EP4220366B1/en
Priority to US18/034,560 priority patent/US12197924B2/en
Publication of WO2023098202A1 publication Critical patent/WO2023098202A1/zh
Anticipated expiration legal-status Critical
Ceased legal-status Critical Current

Links

Images

Classifications

    • G—PHYSICS
    • G06—COMPUTING OR CALCULATING; COUNTING
    • G06F—ELECTRIC DIGITAL DATA PROCESSING
    • G06F3/00—Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
    • G06F3/01—Input arrangements or combined input and output arrangements for interaction between user and computer
    • G06F3/048—Interaction techniques based on graphical user interfaces [GUI]
    • G06F3/0481—Interaction techniques based on graphical user interfaces [GUI] based on specific properties of the displayed interaction object or a metaphor-based environment, e.g. interaction with desktop elements like windows or icons, or assisted by a cursor's changing behaviour or appearance
    • G—PHYSICS
    • G06—COMPUTING OR CALCULATING; COUNTING
    • G06F—ELECTRIC DIGITAL DATA PROCESSING
    • G06F3/00—Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
    • G06F3/01—Input arrangements or combined input and output arrangements for interaction between user and computer
    • G06F3/048—Interaction techniques based on graphical user interfaces [GUI]
    • G06F3/0484—Interaction techniques based on graphical user interfaces [GUI] for the control of specific functions or operations, e.g. selecting or manipulating an object, an image or a displayed text element, setting a parameter value or selecting a range
    • G06F3/04847—Interaction techniques to control parameter settings, e.g. interaction with sliders or dials
    • G—PHYSICS
    • G06—COMPUTING OR CALCULATING; COUNTING
    • G06F—ELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00—Arrangements for program control, e.g. control units
    • G06F9/06—Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/44—Arrangements for executing specific programs
    • G06F9/445—Program loading or initiating
    • G06F9/44505—Configuring for program initiating, e.g. using registry, configuration files
    • G—PHYSICS
    • G06—COMPUTING OR CALCULATING; COUNTING
    • G06F—ELECTRIC DIGITAL DATA PROCESSING
    • G06F3/00—Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
    • G06F3/01—Input arrangements or combined input and output arrangements for interaction between user and computer
    • G06F3/048—Interaction techniques based on graphical user interfaces [GUI]
    • G06F3/0481—Interaction techniques based on graphical user interfaces [GUI] based on specific properties of the displayed interaction object or a metaphor-based environment, e.g. interaction with desktop elements like windows or icons, or assisted by a cursor's changing behaviour or appearance
    • G06F3/04817—Interaction techniques based on graphical user interfaces [GUI] based on specific properties of the displayed interaction object or a metaphor-based environment, e.g. interaction with desktop elements like windows or icons, or assisted by a cursor's changing behaviour or appearance using icons
    • G—PHYSICS
    • G06—COMPUTING OR CALCULATING; COUNTING
    • G06F—ELECTRIC DIGITAL DATA PROCESSING
    • G06F3/00—Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
    • G06F3/01—Input arrangements or combined input and output arrangements for interaction between user and computer
    • G06F3/048—Interaction techniques based on graphical user interfaces [GUI]
    • G06F3/0487—Interaction techniques based on graphical user interfaces [GUI] using specific features provided by the input device, e.g. functions controlled by the rotation of a mouse with dual sensing arrangements, or of the nature of the input device, e.g. tap gestures based on pressure sensed by a digitiser
    • G06F3/0488—Interaction techniques based on graphical user interfaces [GUI] using specific features provided by the input device, e.g. functions controlled by the rotation of a mouse with dual sensing arrangements, or of the nature of the input device, e.g. tap gestures based on pressure sensed by a digitiser using a touch-screen or digitiser, e.g. input of commands through traced gestures
    • G06F3/04883—Interaction techniques based on graphical user interfaces [GUI] using specific features provided by the input device, e.g. functions controlled by the rotation of a mouse with dual sensing arrangements, or of the nature of the input device, e.g. tap gestures based on pressure sensed by a digitiser using a touch-screen or digitiser, e.g. input of commands through traced gestures for inputting data by handwriting, e.g. gesture or text
    • G—PHYSICS
    • G06—COMPUTING OR CALCULATING; COUNTING
    • G06F—ELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00—Arrangements for program control, e.g. control units
    • G06F9/06—Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/44—Arrangements for executing specific programs
    • G06F9/445—Program loading or initiating
    • G—PHYSICS
    • G06—COMPUTING OR CALCULATING; COUNTING
    • G06F—ELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00—Arrangements for program control, e.g. control units
    • G06F9/06—Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/44—Arrangements for executing specific programs
    • G06F9/451—Execution arrangements for user interfaces

Definitions

  • the present application relates to the field of terminal applications, in particular to an application starting method, electronic equipment and a readable storage medium.
  • the electronic device system needs to perform processing to obtain the interface of the application software. Therefore, after the user's operation is completed, the electronic device may display the interface of the application software after a delay for a period of time. At present, it takes a long time from the end of the user's operation to the electronic device displaying the interface of the application software. From the perspective of the user, the startup response speed of the application is relatively slow.
  • the present application provides an application startup method, an electronic device and a readable storage medium, which can improve the startup response speed of application software.
  • the present application provides a method for starting an application, the method including:
  • the electronic device displays the first interface of the first application
  • the electronic device receives a first operation input by a user
  • the electronic device switches the first application to run in the background
  • the electronic device receives a second operation input by the user
  • the electronic device starts the first application
  • the electronic device displays the first image, wherein the first image is related to the first interface, and the preset condition includes: the process of the first application is not End, the first activity corresponding to the first interface is not destroyed, and the first application needs to create a second activity when starting;
  • the electronic device After the electronic device resumes the first activity, the electronic device displays the first interface.
  • an application When an application needs to create a new activity, it first displays the snapshot of the application. During the display of the snapshot of the application, the system will create a new activity internally and restore the target activity (the activity corresponding to the interface displayed before returning to the background last time, and not destroyed), and get the interface corresponding to the target activity. Since the activity corresponding to the interface displayed before returning to the background last time is the same as the activity resumed after the application starts, the snapshot displayed by the application is the same as the first interface displayed after the application starts. From the perspective of the user, the application is improved. The startup response speed of the software.
  • the method further includes:
  • the electronic device obtains the second image based on the first interface
  • the electronic device caches the second image, and the second image includes the first image.
  • the first image is the first interface of the first application
  • the cached second image may be the image of the first interface of the first application, or the image of the first interface of the first application and the image of the status bar .
  • the method before the electronic device displays the first image, the method further includes:
  • the electronic device determines that the process of the first application has not ended
  • the electronic device determines that the first activity corresponding to the first interface is not destroyed
  • the electronic device determines that the first application needs to create the second activity when started.
  • the electronic device includes a logic judgment component and an activity task management component, and the activity task management component is used to record the state of the process of the application;
  • the determination by the electronic device that the process of the first application has not ended includes:
  • the logic judgment component obtains the state of the process of the first application from the activity task management component;
  • the logic judging component determines that the process of the first application has not ended according to the state of the process of the first application.
  • the electronic device includes a logic judgment component and an activity record component, and the activity record component is used to record the state of the activity;
  • the determination by the electronic device that the first activity corresponding to the first interface is not destroyed includes:
  • the logic judgment component acquires the state of the first activity from the activity record component
  • the logic judgment component determines that the first activity is not destroyed according to the state of the first activity.
  • the electronic device includes an activity task management component, and the activity task management component is used to send the start information of the first application to the logical judgment component when the first application starts, and the start information of the first application Including the target activity when the first application is launched;
  • the method further includes:
  • the logic judgment component receives the start information of the first application sent by the activity task management component;
  • the logic judging component determines the target activity when the first application is started as the first activity according to the start information of the first application.
  • the electronic device includes a logic judgment component and an activity task management component, and the activity task management component is configured to send the startup information of the first application to the logic judgment component when the first application is started, and the first The launch information for the application includes creating a second activity;
  • the method further includes:
  • the logic judgment component receives the start information of the first application sent by the activity task management component;
  • the electronic device determines that the first application needs to create a second activity when starting, including:
  • the logic judging component determines according to the startup information of the first application that the first application needs to create the second activity when it is started.
  • the electronic device further includes a desktop launcher
  • the electronic device receives the second operation input by the user, specifically:
  • the desktop launcher receives a second operation input by the user
  • the method also includes:
  • the desktop launcher sends an instruction to start the first application to the active task management component
  • the active task management component acquires launch information of the first application
  • the activity task management component sends the start information of the first application to the logical judgment component.
  • the electronic device includes: an activity task management component, a logic judgment component, a snapshot module, and a WMS;
  • the electronic device caches the second image, including:
  • the snapshot module caches the second image
  • the electronic device displays the first image, including:
  • the logic judging component judges that the first application satisfies the preset condition, the logic judging component sends first information to the activity task management component, and the first information is used to indicate that the first application satisfies the preset condition;
  • the activity task management component When the activity task management component receives the first information, it sends the second information to the snapshot module, and the second information is used to instruct the snapshot module to send the second image to the WMS;
  • the snapshot module sends the second image to the WMS
  • the WMS controls the electronic device to display the first image based on the second image.
  • the electronic device includes: an activity recording component;
  • the second information sent by the activity task management component to the snapshot module includes:
  • the active task management component sends the second information to the snapshot module through the active record component.
  • the first image is the same as the second image, and the first image is the same as the image of the first interface;
  • the first image is the same as the image of the first interface
  • the second image includes the image of the first interface and the content of the first status bar
  • the content of the first status bar is the content of the status bar of the electronic device when the electronic device caches the second image.
  • the snapshot of the application saved before the application returns to the background is recorded as the second image.
  • the 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 a status bar (the content of the status bar at the time of screenshotting).
  • the displayed snapshot (first image) is an image that includes the first interface of the first application and does not include the content of the status bar.
  • the electronic device When the electronic device displays the first image, when the second image does not include the status bar (the content of the status bar at the moment of the screenshot), it is necessary to synthesize the saved second image and the current status bar content; content of the status bar), cover the current status bar content of the system over the status bar area of the second image; or take a screenshot of the second image to obtain the first interface that contains the first interface of the first application and does not contain the content of the status bar. image, and then when the electronic device displays the first image, synthesize the first image and the contents of the status bar.
  • the status bar the content of the status bar at the moment of the screenshot
  • the method further includes:
  • the snapshot module sends the information that the second image is added successfully to the active task management component
  • the active task management component In response to receiving the information that the second image is successfully added, the active 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.
  • the electronic device includes an activity recording component
  • the snapshot module sends the information that the second image is successfully added to the active task management component including:
  • the snapshot module sends the information that the second image is successfully added to the active task management component through the active recording component.
  • the second operation is an operation acting on the icon of the first application displayed on the system desktop of the electronic device, and the electronic device further includes: a desktop launcher;
  • the method also includes:
  • the active task management component sends third information to the desktop launcher, where the third information is used to instruct the desktop launcher to stop displaying the system desktop.
  • the snapshot module caching the second image includes:
  • the snapshot module caches the second image in a snapshot cache file
  • the snapshot module sending the second image to the WMS includes:
  • the snapshot module obtains the second image from the snapshot cache file
  • the snapshot module sends the second image to the WMS.
  • the method before the electronic device receives the second operation input by the user, the method further includes:
  • the electronic device receives a third operation input by the user
  • the electronic device starts the second application and displays the second interface of the second application.
  • the user can perform other operations on the electronic device, for example, start the second application through a third operation; the second application can also be returned to the background, so that the electronic device displays the system desktop.
  • the user can start multiple applications and then return to the system desktop. Or the electronic device starts the first application through other applications without returning to the system desktop.
  • the method before the electronic device resumes the first activity, the method further includes:
  • the electronic device creates a second activity.
  • the first operation includes: a gesture operation on a touch screen of the electronic device; or, an air gesture operation within a field of view of a camera of the electronic device.
  • the first operation may be any operation of switching the first application from running in the foreground to running in the background when the electronic device displays the first interface of the first application.
  • an electronic device including a processor, and the processor is configured to run a computer program stored in a memory to implement the method of any one of the first aspects of the present application.
  • a chip system including a processor, the processor is coupled to a memory, and the processor executes a computer program stored in the memory, so as to implement the method in any one of the first aspects of the present application.
  • a computer-readable storage medium stores a computer program.
  • the computer program is executed by one or more processors, the method in any one of the first aspects of the present application is implemented.
  • the present application provides a computer program product, which, when the computer program product is run on a device, causes the device to execute any one of the methods in the first aspect of the present application.
  • FIG. 1 is a schematic diagram of a hardware structure of an electronic device provided in an embodiment of the present application
  • FIG. 2 is a schematic diagram showing application response time when an application is started according to an embodiment of the present application
  • FIG. 3 is a schematic diagram of an interface when an application is started according to an embodiment of the present application
  • FIG. 4 is a schematic diagram of an interface when another application is started according to an embodiment of the present application.
  • FIG. 5 is a schematic diagram of an interface when another application is started according to the embodiment of the present application.
  • FIG. 6 is a schematic diagram of an interface when another application is started according to the embodiment of the present application.
  • FIG. 7 is a schematic diagram of an interface when another application is started according to the embodiment of the present application.
  • FIG. 8 is a schematic diagram of an interface when another application is started according to an embodiment of the present application.
  • FIG. 9 is a schematic diagram of an interface when another application is started according to an embodiment of the present application.
  • FIG. 10 is a technical architecture diagram of an application startup method provided by an embodiment of the present application.
  • FIG. 11 is a sequence diagram of an application startup method provided by an embodiment of the present application.
  • FIG. 12 is a schematic diagram of a way to start an application provided by an embodiment of the present application.
  • FIG. 13 is a schematic flowchart of the application startup provided by the embodiment of the present application.
  • one or more refers to one, two or more than two; "and/or” describes the association relationship of associated objects, indicating that there may be three types of relationships; for example, A and/or B may mean: A exists alone, A and B exist simultaneously, and B exists alone, wherein A and B may be singular or plural.
  • the character "/" generally indicates that the contextual objects are an "or" relationship.
  • references to "one embodiment” or “some embodiments” or the like in the specification of the present application means that a particular feature, structure, or characteristic described in connection with the embodiment is included in one or more embodiments of the present application.
  • appearances of the phrases “in one embodiment,” “in some embodiments,” “in other embodiments,” “in other embodiments,” etc. in various places in this specification are not necessarily All refer to the same embodiment, but mean “one or more but not all embodiments” unless specifically stated otherwise.
  • the terms “including”, “comprising”, “having” and variations thereof mean “including but not limited to”, unless specifically stated otherwise.
  • the method for starting an application provided in the embodiment of the present application may be applicable to an electronic device.
  • the electronic device may be a tablet computer, a mobile phone, a wearable device, a notebook computer, an ultra-mobile personal computer (ultra-mobile personal computer, UMPC), a netbook, a personal digital assistant (personal digital assistant, PDA) and other electronic devices.
  • the embodiment of the present application does not limit the specific type of the electronic device.
  • Fig. 1 shows a schematic structural diagram of an electronic device.
  • the electronic device 100 may include a processor 110, an external memory interface 120, an internal memory 121, a universal serial bus (universal serial bus, USB) interface 130, a charging management module 140, a power management module 141, a battery 142, an antenna 1, and an antenna 2 , mobile communication module 150, wireless communication module 160, audio module 170, speaker 170A, receiver 170B, microphone 170C, earphone jack 170D, sensor module 180, button 190, motor 191, camera 193, display screen 194, and user identification module ( subscriber identification module, SIM) card interface 195 etc.
  • the sensor module 180 may include a pressure sensor 180A, a touch sensor 180K and the like.
  • the structure illustrated in the embodiment of the present application does not constitute a specific limitation on the electronic device 100 .
  • the electronic device 100 may include more or fewer components than shown in the figure, or combine certain components, or separate certain components, or arrange different components.
  • the illustrated components can be realized in hardware, software or a combination of software and hardware.
  • the processor 110 may include one or more processing units, for example: the processor 110 may include an application processor (application processor, AP), a modem processor, a graphics processing unit (graphics processing unit, GPU), an image signal processor (image signal processor, ISP), controller, memory, video codec, digital signal processor (digital signal processor, DSP), baseband processor, and/or neural network processor (neural-network processing unit, NPU) wait. Wherein, different processing units may be independent devices, or may be integrated in one or more processors. For example, the processor 110 is configured to execute the method for starting an application in the embodiment of the present application.
  • the controller may be the nerve center and command center of the electronic device 100 .
  • the controller can generate an operation control signal according to the instruction opcode and timing signal, and complete the control of fetching and executing the instruction.
  • a memory may also be provided in the processor 110 for storing instructions and data.
  • the memory in processor 110 is a cache memory.
  • the memory may hold instructions or data that the processor 110 has just used or recycled. If the processor 110 needs to use the instruction or data again, it can be directly called from the memory. Repeated access is avoided, and the waiting time of the processor 110 is reduced, thereby improving the efficiency of the system.
  • the USB interface 130 is an interface conforming to the USB standard specification, specifically, it can be a Mini USB interface, a Micro USB interface, a USB Type C interface, and the like.
  • the USB interface 130 can be used to connect a charger to charge the electronic device 100 , and can also be used to transmit data between the electronic device 100 and peripheral devices.
  • the external memory interface 120 can be used to connect an external memory card, such as a Micro SD card, so as to expand the storage capacity of the electronic device 100.
  • the external memory card communicates with the processor 110 through the external memory interface 120 to implement a data storage function. Such as saving music, video and other files in the external memory card.
  • the internal memory 121 may be used to store computer-executable program codes including instructions.
  • the processor 110 executes various functional applications and data processing of the electronic device 100 by executing instructions stored in the internal memory 121 .
  • the internal memory 121 may include an area for storing programs and an area for storing data. Wherein, the stored program area can store an operating system and at least one application program required by a function (such as a sound playing function, an image playing function, etc.).
  • the internal memory 121 may include a high-speed random access memory, and may also include a non-volatile memory, such as at least one magnetic disk storage device, flash memory device, universal flash storage (universal flash storage, UFS) and the like.
  • a non-volatile memory such as at least one magnetic disk storage device, flash memory device, universal flash storage (universal flash storage, UFS) and the like.
  • the charging management module 140 is configured to receive a charging input from a charger.
  • the charger may be a wireless charger or a wired charger.
  • the charging management module 140 can receive charging input from the wired charger through the USB interface 130 .
  • the power management module 141 is used for connecting the battery 142 , the charging management module 140 and the processor 110 .
  • the power management module 141 receives the input from the battery 142 and/or the charging management module 140 to provide power for the processor 110 , the internal memory 121 , the external memory, the display screen 194 , the camera 193 , and the wireless communication module 160 .
  • the power management module 141 may also be disposed in the processor 110 . In some other embodiments, the power management module 141 and the charging management module 140 may also be set in the same device.
  • the wireless communication function of the electronic device 100 can be realized by the antenna 1 , the antenna 2 , the mobile communication module 150 , the wireless communication module 160 , a modem processor, a baseband processor, and the like.
  • Antenna 1 and Antenna 2 are used to transmit and receive electromagnetic wave signals.
  • Each antenna in electronic device 100 may be used to cover single or multiple communication frequency bands. Different antennas can also be multiplexed to improve the utilization of the antennas.
  • Antenna 1 can be multiplexed as a diversity antenna of a wireless local area network.
  • the antenna may be used in conjunction with a tuning switch.
  • the mobile communication module 150 can provide wireless communication solutions including 2G/3G/4G/5G applied on the electronic device 100 .
  • the mobile communication module 150 may include at least one filter, switch, power amplifier, low noise amplifier (low noise amplifier, LNA) and the like.
  • the mobile communication module 150 can receive electromagnetic waves through the antenna 1, filter and amplify the received electromagnetic waves, and send them to the modem processor for demodulation.
  • the mobile communication module 150 can also amplify the signals modulated by the modem processor, and convert them into electromagnetic waves and radiate them through the antenna 1 .
  • the wireless communication module 160 can provide wireless local area networks (wireless local area networks, WLAN) (such as wireless fidelity (Wireless Fidelity, Wi-Fi) network), bluetooth (bluetooth, BT), global navigation satellite, etc. applied on the electronic device 100.
  • System global navigation satellite system, GNSS
  • frequency modulation frequency modulation, FM
  • near field communication technology near field communication, NFC
  • infrared technology infrared, IR
  • the wireless communication module 160 may be one or more devices integrating at least one communication processing module.
  • the wireless communication module 160 receives electromagnetic waves via the antenna 2 , frequency-modulates and filters the electromagnetic wave signals, and sends the processed signals to the processor 110 .
  • the wireless communication module 160 can also receive the signal to be sent from the processor 110 , frequency-modulate it, amplify it, and convert it into electromagnetic waves through the antenna 2 for radiation.
  • the antenna 1 of the electronic device 100 is coupled to the mobile communication module 150, and the antenna 2 is coupled to the wireless communication module 160, so that the electronic device 100 can communicate with the network and other devices through wireless communication technology.
  • the electronic device 100 can implement audio functions through the audio module 170 , the speaker 170A, the receiver 170B, the microphone 170C, the earphone interface 170D, and the application processor. Such as music playback, recording, etc.
  • the audio module 170 is used for converting digital audio signals into analog audio signals for output, and also for converting analog audio input into digital audio signals.
  • the audio module 170 may also be used to encode and decode audio signals.
  • the audio module 170 may be set in the processor 110 , or some functional modules of the audio module 170 may be set in the processor 110 .
  • Speaker 170A also referred to as a "horn" is used to convert audio electrical signals into sound signals.
  • Electronic device 100 can listen to music through speaker 170A, or listen to hands-free calls.
  • Receiver 170B also called “earpiece” is used to convert audio electrical signals into sound signals.
  • the receiver 170B can be placed close to the human ear to receive the voice.
  • the microphone 170C also called “microphone” or “microphone” is used to convert sound signals into electrical signals. When making a phone call or sending a voice message, the user can put his mouth close to the microphone 170C to make a sound, and input the sound signal to the microphone 170C.
  • the electronic device 100 may be provided with at least one microphone 170C. In other embodiments, the electronic device 100 can be provided with two microphones 170C, which can also implement a noise reduction function in addition to listening to voice information. In some other embodiments, the electronic device 100 can also be provided with three, four or more microphones 170C to collect sound signals, reduce noise, identify sound sources, and realize directional recording functions, etc.
  • the earphone interface 170D is used for connecting wired earphones.
  • the earphone interface 170D can be a USB interface 130, or a 3.5mm open mobile terminal platform (open mobile terminal platform, OMTP) standard interface, or a cellular telecommunications industry association of the USA (CTIA) standard interface.
  • OMTP open mobile terminal platform
  • CTIA cellular telecommunications industry association of the USA
  • the pressure sensor 180A is used to sense the pressure signal and convert the pressure signal into an electrical signal.
  • pressure sensor 180A may be disposed on display screen 194 .
  • pressure sensors 180A such as resistive pressure sensors, inductive pressure sensors, and capacitive pressure sensors.
  • a capacitive pressure sensor may be comprised of at least two parallel plates with conductive material.
  • the electronic device 100 determines the intensity of pressure according to the change in capacitance.
  • the electronic device 100 detects the intensity of the touch operation according to the pressure sensor 180A.
  • the electronic device 100 may also calculate the touched position according to the detection signal of the pressure sensor 180A.
  • Touch sensor 180K also known as "touch panel”.
  • the touch sensor 180K can be disposed on the display screen 194, and the touch sensor 180K and the display screen 194 form a touch screen, also called a “touch screen”.
  • the touch sensor 180K is used to detect a touch operation on or near it.
  • the touch sensor can pass 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 the display screen 194 .
  • the touch sensor 180K may also be disposed on the surface of the electronic device 100 , which is different from the position of the display screen 194 .
  • the keys 190 include a power key, a volume key and the like.
  • the key 190 may be a mechanical key. It can also be a touch button.
  • the electronic device 100 may receive key input and generate key signal input related to user settings and function control of the electronic device 100 .
  • the motor 191 can generate a vibrating reminder.
  • the motor 191 can be used for incoming call vibration prompts, and can also be used for touch vibration feedback.
  • the electronic device 100 realizes the display function through the GPU, the display screen 194 , and the application processor.
  • the GPU is a microprocessor for image processing, and is connected to the display screen 194 and the application processor. GPUs are used to perform mathematical and geometric calculations for graphics rendering.
  • Processor 110 may include one or more GPUs that execute program instructions to generate or change display information.
  • the display screen 194 is used to display images, videos and the like.
  • the electronic device 100 may include 1 or N display screens 194 , where N is a positive integer greater than 1.
  • Camera 193 is used to capture still images or video.
  • the electronic device 100 may include 1 or N cameras 193 , where N is a positive integer greater than 1.
  • the SIM card interface 195 is used for connecting a SIM card.
  • the SIM card can be connected and separated from the electronic device 100 by inserting it into the SIM card interface 195 or pulling it out from the SIM card interface 195 .
  • the electronic device 100 may support 1 or N SIM card interfaces, where N is a positive integer greater than 1.
  • the embodiment of this application does not specifically limit the specific structure of the execution subject of an application startup method, as long as the code of an application startup method in this application embodiment can be recorded by running, an application provided by this application embodiment Start the method to process it.
  • the execution subject of an application launching method provided in the embodiment of the present application may be a functional module in an electronic device capable of invoking a program and executing the program, or a processing device applied in the electronic device, for example, a chip.
  • Applications can be installed and run on the electronic device shown in FIG. 1 .
  • application A any application program installed in the electronic device
  • the display screen of the electronic device displays the interface of application A
  • the user of the electronic device can communicate with the interface of application A currently displayed on the display screen of the electronic device for interactive operation.
  • the electronic device runs application A 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; of course, application A can receive other information (such as , the instant messaging application can receive messages sent by other users) and notify the users of the other information.
  • the user uses the electronic device, if the application A is not running (not running in the background or running in the foreground), the user starts the application A through the icon of the application A on the desktop of the electronic device, and the electronic device first creates a process for the application.
  • the activity of application A for example, Activity1
  • Activity1 enters the task stack and is located at the top of the task stack.
  • the electronic device displays that Activity1 corresponds to an interface 1 .
  • the user can perform an interactive operation through the interface 1 corresponding to Activity1.
  • the process of application A in the system will run another new Activity (such as Activity2), and this Activity2 will enter the task stack and is located at the top of the task stack, the old Activity1 will be pushed below the task stack.
  • the display screen of the electronic device displays interface 2 corresponding to Activity2, and the old interface of Activity1 is destroyed.
  • the user can perform an interactive operation (for example, return operation) on the interface 2 corresponding to Activity2, so that Acitivity1 in the task stack returns to the top of the task stack, then Activity2 is destroyed, and correspondingly, the display screen of the electronic device displays the task Interface 1 corresponding to Activity1 at the top of the stack.
  • each interface displayed by the application depends on the process of the application to run each activity.
  • the process of the application may still exist in the system (for example, the process of the application has not died).
  • the process of the application may also be destroyed, that is, the process of the application does not exist in the system background.
  • the embodiment of the present application may be applied in a hot start-up scenario of an application.
  • FIG. 2 it is an application scenario provided by the embodiment of the present application.
  • the electronic device displays a system desktop, and the user clicks an icon of application A (for example, a video icon) on the system desktop of the electronic device.
  • an icon of application A for example, a video icon
  • the electronic device displays the system desktop shown in (a) in FIG. 2 , there is a process of application A in the background of the system.
  • the electronic device displays the interface of application A, see (b) in FIG. 2 .
  • the embodiment of the present application is used to improve the response speed of the electronic device from the click operation shown in (a) in FIG. 2 to displaying the interface of application A corresponding to (b) in FIG. 2 .
  • the interface corresponding to (b) in FIG. 2 is the last interface displayed when application A returns from the foreground to the background operation last time.
  • the last interface displayed before the electronic device runs from the foreground to the background may be recorded as interface A.
  • the user can click the icon of application A on the desktop (see (a) in FIG. 2 ) to switch the application A to run in the foreground.
  • interface A has been destroyed.
  • the electronic device detects the click operation of the icon of the application A, it needs to use the process of the application A to redraw the interface A.
  • the electronic device draws the interface A It takes a long time, resulting in slow response speed and affecting user experience.
  • the present application it may be set that when an application is switched to the background, a snapshot of the last interface displayed before the application is switched to the background is saved.
  • the snapshots in the embodiments of the present application all represent snapshots of the last interface displayed before the application switches to the background last time.
  • hot start of the application when the application enters the foreground from the background, the process of the application is not terminated
  • the task when the application is switched to the background After the Activity at the top of the stack is resumed (resume) to obtain the interface corresponding to the Activity, the obtained interface is displayed.
  • the interface corresponding to the Activity at the top of the task stack before the application is switched to the background is the last interface displayed before the application is switched to the background.
  • FIG. 3 to FIG. 4 it is an application scenario provided by the embodiment of this application.
  • the electronic device displays a system desktop, and the user clicks an icon of application A (for example, a video application) on the system desktop.
  • application A for example, a video application
  • the system first creates the process of application A 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.
  • the interface of the electronic device may still display the original interface (system desktop), see (b) in FIG. 3 .
  • the advertisement interface does not exist when the application A is cold-started as an example.
  • the original interface the interface where the application A is located, which can be the system desktop
  • other animation effects can also be added, for example, the application icon of the clicked application A is changed from a colored icon to a gray scale icon and then change to a colored icon; or the application icon is enlarged by a preset multiple and then changed to the original size.
  • the change of the above-mentioned application icon is still an animation effect with the interface where the application icon is located (the system desktop where the application A is located) as the background.
  • the change process of the above application icon can be interpreted as displaying the original interface (the system desktop where the application A is located).
  • the electronic device displays the interface corresponding to the main Activity.
  • the electronic device displays the interface of application A (for example, a video application) shown in (c) in FIG.
  • the interface displayed by the electronic device before the application enters the background from the foreground is recorded as Interface 1
  • the Activity corresponding to Interface 1 is recorded as Activity1.
  • the interface 1 corresponding to Activity1 is saved as a snapshot (snapshot1).
  • the snapshot obtained at this time is an image obtained by taking a screenshot of the interface 1 corresponding to Activity1. It can be understood from (d) in FIG. 3 that although the interface currently displayed by the electronic device is composed of the interface of application A and the status bar. However, the saved snapshot is an image corresponding to the interface of application A, and the status bar part is not included in the image.
  • the obtained snapshot may also be an image obtained by taking a screenshot of the interface currently displayed by the electronic device.
  • the image includes application A's interface and status bar parts.
  • the process of application A is not destroyed, that is, application A is a hot start.
  • application A is warm-started, if there is no need to create other activities other than Activity1.
  • the system first displays the snapshot snapshot1, see (a) in FIG. 4 .
  • the snapshot1 shown in (a) in FIG. 4 is a snapshot and a status bar synthesized by the system. If the previously saved snapshot is the image corresponding to the interface of application A (excluding the status bar), the displayed snapshot1 is the snapshot layer and the status bar layer synthesized by the system. If the previously saved snapshot is the image (including the status bar) corresponding to the interface currently displayed by the electronic device, then the displayed snapshot1 is the interface after the system overwrites the snapshot layer by the status bar layer.
  • the snapshot of the application saved before the application returns to the background is recorded as the second image.
  • the snapshot displayed when the application is restarted is recorded as the first image. Since the saved snapshot (second image) may or may not include a status bar (the content of the status bar at the time of screenshotting), the displayed snapshot (first image) is an image that does not include a status bar. When the electronic device displays the first image, it needs to synthesize the saved second image and the current status bar content, or cover the current status bar content over the status bar area of the second image.
  • the electronic device may also perform screenshot processing on the second image to obtain a first image that contains the first interface of the first application and does not contain the content of the status bar (the content of the status bar at the time of screenshot), and then the electronic device displays the first image. For the first image, synthesize the first image and the current status bar content of the electronic device.
  • the system resumes Activity1 to obtain the interface 1 corresponding to the Activity1.
  • the electronic device changes from displaying snapshot1 to displaying interface 1, see (b) in FIG. 4 .
  • snapshot1 is a snapshot of the interface corresponding to Activity1 of application A
  • interface 1 is the interface corresponding to Activity1 of application A
  • the electronic device in (a) in Figure 4 and (b) in Figure 4 displays The interface is the same.
  • the activity change and window change of the electronic device can refer to the time progress diagram shown in (c) in Figure 4.
  • the electronic device first draws a snapshot1 from the beginning of the hot boot, and during the drawing of the snapshot1, the electronic device displays the original interface (for example, the system desktop) where the icon of the application A is located. After snapshot1 is drawn, the electronic device changes from displaying the system desktop to displaying snapshot1.
  • the process of application A resumes Activity1, and when the interface 1 corresponding to Activity1 is obtained, the electronic device changes from displaying snapshot1 to displaying interface 1.
  • the user thinks that the startup response time of application A is from the time when the user clicks the icon of application A (which can be considered to be equivalent to the start time of hot start) to the time when the electronic device displays snapshot1. Since the snapshot1 is in an image format, it usually takes less time to draw the snapshot1 in this image format. From the user's point of view, the response of the application startup is very fast, which improves the user experience.
  • FIG. 5 to FIG. 6 it is another application scenario provided by the embodiment of the present application.
  • the electronic device displays the system desktop, and the user clicks the icon of application A (for example, a video application) on the system desktop.
  • application A for example, a video application
  • the system first creates the process of application A for application A.
  • the process of application A starts the main activity of application A and draws the interface corresponding to the main activity.
  • the process of application A can also be created first.
  • the advertising activity can be created (create) through the process of application A, and the interface corresponding to the advertising activity can be obtained and displayed. See (b) in Figure 5
  • the advertisement interface in the process of displaying the advertisement interface corresponding to the advertisement Activity, the main Activity of the application A is started through the process of the application A and the interface corresponding to the main Activity is drawn.
  • the electronic device changes from displaying the advertisement interface to displaying the interface corresponding to the main Activity.
  • the electronic device displays the interface of application A (for example, a video application) shown in (c) in FIG.
  • the interface displayed by the electronic device before the application enters the background from the foreground is recorded as Interface 1
  • the Activity corresponding to Interface 1 is recorded as Activity1.
  • the interface 1 corresponding to Activity1 is saved as a snapshot (snapshot1).
  • the electronic device displays the interface shown in (d) in FIG. A period of time may pass in the middle.
  • the user can also perform other operations through the electronic device, for example, click the icon of application B (an application other than application A in the electronic device) to make application B run in the foreground, and return to the application B After running in the background, the electronic device displays the system desktop.
  • Activity0 is a pre-set advertising Activity.
  • the developer of application A can set: every time application A is started, Activity0 will be created, and the advertising interface corresponding to Activity0 can be displayed at cold start , the advertisement interface corresponding to Activity0 may or may not be displayed during hot start, and the specific setting may be determined by the developer of application A.
  • the system of the electronic device In the application startup phase, if there is an activity of creating (create) Activity, in order to avoid that the interface corresponding to the newly created Activity does not correspond to the snapshot saved when the application returned to the background last time, the system of the electronic device usually sets the snapshot process to not take effect. That is, the snapshot of the last interface of the application saved when returning to the background last time is no longer displayed.
  • the developer of application A may set: During the hot start phase of the application, the advertisement interface corresponding to Activity0 is not displayed, that is, the process of application A can create Activity0, but Activity0 is not displayed The corresponding advertising interface. Then, after the user clicks the icon of application A to start the hot start, the electronic device will display the original interface (system desktop) where the icon of application A displayed by the electronic device is located when the user clicks the icon of application A, see (a) in FIG. 6 . In 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.
  • the interface display process during the hot start can be performed according to the display logic described in FIG. 7 .
  • the system When the application is started, the system first draws and displays the snapshot (snapshot1), see the interface shown in (a) in Figure 7, in addition, see (c) in Figure 7, in the process of drawing the snapshot (snapshot1), the electronic The device displays an interface (for example, the system desktop) where the icon of application A is located. After the electronic device draws the snapshot (snapshot1), the window of the electronic device changes from displaying the system desktop to displaying snapshot1. During the period when the electronic device displays snapshot1, the process of application A creates Activity0 and resume Activity1. After resume Activity1, the interface 1 corresponding to Activity1 is obtained. After obtaining interface 1, the system will change from displaying snapshot (snapshot1) to displaying interface 1, see Figure 7 The interface shown in (b).
  • the process of application hot start in Figure 7 can also be understood as, when the application is hot started, an Activity is created and the Activity corresponding to the snapshot is not destroyed, the saved snapshot is forced to be displayed at the stage of creating the Activity until the system obtains The finally displayed interface (the interface corresponding to the Activity at the top of the task stack before the application switched to the background last time).
  • the snapshot image generated by the interface corresponding to Activity1 of application A when application A is started, after the process of application A resumes Activity1, the interface displayed by the electronic device is the interface corresponding to Activity1.
  • the content of the interface corresponding to Activity1 (or the snapshot generated by the interface) before application A returns to the background last time is the same as that of the interface corresponding to Activity1 displayed after application A starts this time.
  • the interface corresponding to Activity1 can dynamically display two (or more than two) images for When sliding to switch between scenes, if the moment when the screenshot is taken to generate a snapshot is just at the moment when the image is slid to switch, the snapshot generated by the screenshot may display half of the two images.
  • the interface displayed by the electronic device may be an interface after image sliding switching in the interface corresponding to Activity1.
  • the interface corresponding to the snapshot and the interface after the electronic device is started are obtained based on the same Activity. Therefore, the layout of the content in the snapshot and the content of the interface displayed after the electronic device is started are basically the same. , which is usually considered to be the normal playback of animations in this interface.
  • application A returns to the background and displays an interface
  • application A returns to the foreground again, it will also display an interface after startup.
  • the two interfaces correspond to the same Activity, even if the content displayed on the two interfaces is slightly different , and the two interfaces can also be considered as the same interface. This is because usually one Activity corresponds to one interface.
  • two interfaces are generated based on the same Activity, the basic framework of the two interfaces is the same. Even if the specific content of the two interfaces is slightly different, the two interfaces belong to the same interface.
  • the above-mentioned embodiments all take the case where the electronic device displays the main interface of the application A, and the application A is returned to the background as an example for illustration.
  • the embodiment of the present application describes the non-main interface of the electronic device displaying the application A through FIG. 8 and FIG. 9 . In this case, application A is returned to the background as an example for illustration.
  • the electronic device displays the system desktop shown in (e) in FIG. 8 .
  • the electronic device saves the interface 2 corresponding to Activity2 as a snapshot of application A (snapshot2).
  • a judgment logic is added inside the system: to judge whether the application currently switched to the foreground is a hot start, when the application is switched to the background Whether the snapshot is saved; whether the activity corresponding to the interface corresponding to the snapshot of the application has not been destroyed; whether the application will create other activities in the process of displaying the interface when it switched to the background last time. If the above judgment logics are all yes, the following content will be enforced:
  • the system when application A starts, the system first draws and displays a snapshot (snapshot2), and in addition, see (c) in Figure 9, during the process of drawing the snapshot (snapshot2), The electronic device displays an interface (for example, the system desktop) where the icon of the application A is located. After the electronic device finishes drawing the snapshot (snapshot2), the window of the electronic device changes from displaying the system desktop to displaying snapshot2. While the electronic device is displaying snapshot2, the process of application A creates Activity0 and resume Activity2. After resuming Activity2, the interface 2 corresponding to Activity2 is obtained. After obtaining interface 2, the system will change from displaying snapshot (snapshot2) to displaying interface 2. For details, please refer to the figure The interface shown in (b) in 9.
  • the technical architecture diagram shown in FIG. 10 includes an application layer and a framework layer.
  • the technical architecture shown in FIG. 10 is only one example. In practical applications, it may include more layers than those shown in FIG. 10 , and each layer may include more components than those shown in FIG. 10 .
  • the desktop launcher (Launcher) is used to manage the system desktop, for example, start or stop the system desktop and so on.
  • the navigation component can be implemented in various ways, for example, gesture navigation, hover navigation, three-key navigation, etc. For details, refer to the description of the subsequent embodiments.
  • the activity management component includes: activity task management component (ActivityTaskManagerService, ATMS) and Activity record.
  • ATMS is used to be responsible for the startup, switching, scheduling and other work of the Activity.
  • Activity record records the information of the Activity, for example, records the state of the Activity.
  • AMS is used to manage the life cycle of the application's Activity. Take some states in the life cycle as an example.
  • the Activity When an Activity is opened for the first time after the application is cold-started, the Activity is first in the on create state; when the application switches from the foreground to the background, the Activity enters the on stop state. In this state, the interface corresponding to the Activity is invisible; when the Activity is opened again, the Activity first enters the on resume state; when the Activity is switched off, it can enter the on destroy state to complete the destruction.
  • the on destroy state the Activity does not Visible; if the Activity is restarted, it will re-enter the on create state.
  • Window management components include: Snapshot, Snapshotcache and WMS.
  • the Snapshot is used to display the interface of the Activity, and is also used to save and display the snapshot of the last interface displayed before the application switches to the background.
  • Snapshotcache is used to cache the snapshot of the last interface displayed before the application switches to the background obtained by the Snapshot module.
  • WMS is used to draw windows (eg, screens, snapshots of screens).
  • a SnapshotConcurrent module (SC module) is added to the window management component.
  • the SC module is used to judge whether the application satisfies the following conditions (or both are yes) when the application is started, and in the case of satisfying or both are yes, execute the snapshot display process of the application forcibly.
  • the SC module when the application is hot started, it is judged whether the application meets the following conditions:
  • a snapshot of the application is drawn first, and the snapshot is displayed after the drawing of the snapshot is completed.
  • the app's process creates Activity0, resumes Activity1. After the interface corresponding to the Activity1 is drawn, the interface corresponding to the Activity1 is displayed.
  • the process of the application when drawing the snapshot of the application, can also start create Activity0.
  • the system since the snapshot is in image format, the system does not need complex drawing logic compared with the interface corresponding to Activity1, and the response speed of the electronic device to display the snapshot is faster than that of the display interface. From the user's perspective, the app's startup response is fast.
  • the interface 1 corresponding to the Activity1 is consistent with the content of the snapshot (generated by the interface 1), so after the drawing of the interface 1 corresponding to the Activity1 is completed, the process of the electronic device changing from the displayed snapshot to the displayed interface 1 is not perceived by the user , improve user experience.
  • the electronic device first displays the snapshot, but before displaying the snapshot, it also needs to draw the snapshot. Therefore, in the process of drawing the snapshot, the electronic device will display the original interface for a period of time (for example, the application A The system desktop where the icon is located). The length of this period depends on the length of the snapshot drawing process. Generally, the snapshot drawing process is relatively short, and it can also be considered that after the user clicks the application icon, the electronic device first displays the snapshot.
  • the application starting method will be described below through the sequence diagram shown in FIG. 11 .
  • the method includes the following steps:
  • Step B1 the navigation component detects information returning to the system desktop.
  • navigation component in the electronic device system.
  • the navigation component can detect information returning to the system desktop.
  • the user triggers the electronic device to display the system desktop through gesture navigation (for example, the user's finger slides upward from the bottom of the display screen of the electronic device); Ball button) triggers the electronic device to display the system desktop; or, the user triggers the electronic device to display the system desktop through three-key navigation (for example, the user's finger clicks the return home interface button in the three-key navigation).
  • gesture navigation for example, the user's finger slides upward from the bottom of the display screen of the electronic device
  • Ball button triggers the electronic device to display the system desktop
  • the user triggers the electronic device to display the system desktop through three-key navigation (for example, the user's finger clicks the return home interface button in the three-key navigation).
  • the gesture shown in (c) in FIG. 5 may trigger the navigation component to detect information returning to the system desktop.
  • the electronic device displays the system desktop after the user triggers the application A to return from the foreground to the background through gesture navigation as an example.
  • the electronic device can display other interfaces other than the system desktop, and the user returns to the system desktop after performing operations on other interfaces.
  • the user triggers the electronic device to display a side navigation bar through a gesture
  • the side navigation bar is a floating interface that appears on the side of the electronic device, and the floating interface includes icons of multiple applications
  • the user clicks on the application in the side navigation bar icon of B the electronic device controls application A to switch from the foreground to the background, and the electronic device displays the interface of application B.
  • the user triggers the electronic device to return to the system desktop through an operation.
  • the above examples all take the user's gesture on the touch screen of the electronic device as an example to trigger the electronic device to switch the application to the background.
  • the application can also be switched from the foreground to the background through voice commands or air gestures.
  • the electronic device displays the interface of application A
  • the user sends a voice message of "return to the system desktop”
  • the electronic device switches application A to the system background, and the electronic device displays the system desktop.
  • the application continues to send out the voice message of "open application B", and the electronic device displays the interface of application B; the user sends out the voice message of "return to the system desktop”, then the electronic device switches application A to the system background, and the electronic device displays the system desktop.
  • the embodiment of the present application does not limit the triggering mode of running the application from the foreground to the background.
  • the interface displayed by the electronic device is not limited. There is no limitation on the operation of the electronic device by the user during the period between the application A returns to the background and the application A is started again.
  • Step B2 after the navigation component detects the information of returning to the system desktop, the navigation component sends information to the ATMS, and the information is used to notify the ATMS that it will return to the system desktop.
  • ATMS After ATMS receives the information sent by the navigation component for returning to the system desktop, on the one hand, it needs to save the snapshot of the last interface displayed by the application running in the foreground of the electronic device (see step B3 to step B6), and on the other hand, it needs to stop the current foreground operation of the electronic device application (see Step B7 to Step B8).
  • Step B3 after ATMS receives the information sent by the navigation component for returning to the system desktop, it sends information to the snapshot, and the information is used to instruct the snapshot to save the snapshot of the application currently running in the foreground of the electronic device.
  • Step B4 after the snapshot receives the information sent by the ATMS for saving the snapshot of the application currently running in the foreground of the electronic device, it 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 .
  • the snapshot takes a screenshot of the interface currently displayed by application A to obtain a snapshot of the interface currently displayed by application A.
  • the snapshot obtained at this time is not an image snapshot obtained by taking a screenshot of the content currently displayed on the display screen of the electronic device, but an image snapshot obtained according to the interface currently displayed by application A in the electronic device.
  • the content that may be included in the image snapshot is the interface content of the application A, and may not include the content of the system interface (for example, the status bar, etc.).
  • the snapshot obtained in this step may correspond to interface 1 in application A shown in (c) in FIG. 5 (excluding the content corresponding to the status bar).
  • Step B5 after the snapshot obtains the application snapshot, cache the obtained application snapshot in the snapshotcache.
  • step B6 after the snapshot successfully caches the obtained application snapshot in the snapshotcache, it sends a message that the application snapshot is saved successfully to ATMS.
  • step B7 after receiving the information sent by the navigation component for returning to the system desktop, the ATMS sends a message of stopping the operation to the application (application A) currently running in the foreground of the electronic device.
  • step B8 the application currently running in the foreground of the electronic device stops running after receiving the message, and after stopping running, sends a message to ATMS indicating that the application has stopped running currently.
  • step B7 may be performed after a period of time after step B3, or step B7 may be performed after step B6. This embodiment of the present application does not limit this.
  • ATMS may store the process object of the application after receiving the message that the application (application A) running in the foreground of the electronic device has stopped running and the snapshot of the application has been saved successfully.
  • the process object of the application is used to represent the state of the process of the application.
  • the identifier corresponding to the process object of the application is the first identifier (for example, 1)
  • the process of the application when the identifier corresponding to the object is the second identifier (for example, 0), it means that the application process does not exist (has been destroyed).
  • ATMS stores the process object of the application, it stores it with the first identifier.
  • One identifier will be updated to a second identifier.
  • the first identifier and the second identifier are only examples, and in actual applications, the second identifier may also be empty (null).
  • Step B10 ATMS sends the latest state of Activity1 of application A to the Activity record, so as to update the state of Activity1 of application A stored in the Activity record.
  • the activity at the top of the task stack of application A at this time is Activity1.
  • ATMS includes a task stack.
  • ATMS can determine from the task stack of application A that the activity at the top of the task stack of application A is Activity1, and then send the state of Activity1 (on Pause state or on stop state) to the Activity record.
  • the state of Activity1 of application A is destroyed (destroy)
  • the state of Activity1 recorded in the Activity record will be updated to the on destroy state.
  • Activity record will store the state of Activity1.
  • step B11 after ATMS sends the state of Activity1 of application A to the Activity record, it sends a message to the desktop launcher to indicate that the system desktop is started.
  • the message may instruct the display screen of the electronic device to display the system desktop.
  • Step B12 after the desktop launcher receives the message from the ATMS for indicating that the system desktop is opened, it displays the system desktop on the display screen of the electronic device, and returns a message to the ATMS that the system desktop has been opened.
  • the electronic device displays the interface shown in (d) in FIG. 5 , that is, the display screen of the electronic device displays the system desktop.
  • the user can also click the icon of the application A on the system desktop to start the application A again. Since the time after application A returns from the foreground to the background is relatively short, in this case, application A is usually warm-started.
  • the embodiment of the present application is described by taking application A to be started again as an example when the electronic device displays the system desktop after the application A returns from the foreground to the background.
  • the user can also return to the system desktop of the electronic device after performing other operations on the system desktop of the electronic device to enter other interfaces after application A returns from the foreground to the background, and then click the icon of application A on the system desktop to start the application a.
  • Step B13 the desktop launcher detects the operation of launching application A.
  • the embodiment of the present application focuses on describing the hot start scenario of application A, which may be a scenario where the user clicks the application icon on the system desktop to start the application, for example, (d) in FIG. 5 .
  • the desktop launcher detects the operation of launching application A.
  • FIG. 12 it is a scenario of jumping from other applications to application A to start application A.
  • the electronic device displays the interface of other applications (for example, application B), the interface includes the jump control of application A, the user clicks the jump control of application A, application B detects the operation of starting application A, and the electronic device App A will be launched.
  • other applications for example, application B
  • the interface includes the jump control of application A
  • application B detects the operation of starting application A
  • the electronic device App A will be launched.
  • FIG. 12 it is a scenario where the user clicks a small control on the system desktop to start application A.
  • the small control can detect the operation of starting the application A.
  • Step B14 after the desktop launcher detects the operation of starting the application A, the desktop launcher sends an instruction for starting the application A to the ATMS, and the instruction may carry the unique identifier of the application A.
  • the unique identifier may be the package name of application A.
  • Step B15 after ATMS receives the instruction for starting application A sent by the desktop launcher, it obtains the startup parameters of application A: create Activity0, the target Activity is Activity1, and sends the startup parameters of application A to the SC module.
  • the startup parameters can also be recorded as startup information.
  • Activity0 may be an advertising activity added by the developer of application A when application A starts, of course, it may also be other activities that need 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 returned to the background last time.
  • the SC module After the SC module receives the startup parameters of the application A sent by the ATMS, it can judge whether the application A satisfies the judgment logic in the above embodiment.
  • the SC module first determines that the currently started application is application A according to the received application identifier, and then judges whether the three conditions are met (or whether all are yes).
  • the execution order of the three judgment steps is not in particular order.
  • the application does not limit the sequence of the three judgment steps. Of course, if the execution result of any judgment step is negative, the SC module may no longer execute the subsequent judgment steps, but execute the original flow of the application A when the application A is started and the developer of the system.
  • step B16 it is possible to first determine whether the application A has the behavior of creating other activities, then determine whether the application is currently hot-started, and finally determine whether the target Activity has not been destroyed.
  • step B16 it is possible to first determine whether the application A has the behavior of creating other activities, then determine whether the application is currently hot-started, and finally determine whether the target Activity has not been destroyed.
  • step B16 the SC module determines that there is a behavior of creating other activities according to the received startup parameters of the application A (determined by the startup parameter create Activity0).
  • step B17 the SC module obtains the process object of application A from ATMS (it can be obtained through the unique identifier of the application).
  • step B18 the SC module obtains the process object of application A from ATMS.
  • 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 the application A still exists in the system, and it can be determined that the application A is currently hot-started.
  • step B19 the SC module determines that application A is hot-started according to the obtained process object of application A.
  • the SC module obtains that the process object of application A is "1". In combination with the description of the process object in step B9, the SC module determines that application A is a hot start according to the obtained content (1) of the process object of application A.
  • step B20 the SC module acquires the state of the target Activity (Activity1) from the Activity record.
  • step B21 the SC module obtains the state of the target Activity (Activity1) from the Activity record.
  • the state of the Activity is stored in the Activity record. If the state of the Activity1 is not the destroy state, it is determined that the Activity1 has not been destroyed.
  • step B22 the SC module determines that Activity1 has not been destroyed according to the obtained state of the target Activity (Activity1).
  • step B16 to B22 it can be determined that application A satisfies the conditions corresponding to the above three determination steps (or the determination results are all yes).
  • Step B23 after determining that application A satisfies the conditions corresponding to the above three determination steps through steps B16 to B22, send information to ATMS to execute and display the snapshot of application A.
  • Step B24 ATMS sends the information for adding the snapshot of application A to ActivityRecord after receiving the information for executing and displaying the snapshot of application A sent by the SC module.
  • Step B25 After receiving the information for adding the snapshot of application A sent by ATMS, ActivityRecord sends the information for adding the snapshot of application A to snapshot.
  • Step B26 after the snapshot receives the information for adding the snapshot of the application A, it acquires the snapshot of the application A from the snapshotcache.
  • the snapshot is the snapshot of application A stored in step B5.
  • Step B27 the snapshot obtains the snapshot of the application A from the snapshotcache.
  • the information transmitted in step B24 to step B26 may carry the identifier of application A and the identifier of Activity1.
  • the snapshot corresponding to Activity1 of application A is obtained by using the identifier of application A and the identifier of Activity1.
  • Step B28 after the snapshot obtains the snapshot of application A from the snapshotcache, it sends the snapshot of application A to the WMS.
  • Step B29 after the snapshot successfully sends the snapshot to the WMS, send a message to the ActivityRecord indicating that the snapshot of the application A is successfully added.
  • step B30 after receiving the message sent by the snapshot for indicating that the snapshot of application A is successfully added, ActivityRecord sends a message for indicating that the snapshot of application A is successfully added to ATMS.
  • Step B31 after ATMS receives the message indicating that the snapshot of application A is successfully added, it first sends an instruction to snapshot, and the instruction is used to instruct snapshot to execute the application startup effect.
  • step B32 the snapshot sends an instruction to draw a snapshot to the WMS after receiving the instruction for instructing to execute the application startup effect sent by the ATMS.
  • Step B33 after receiving the command to draw the snapshot sent by the snapshot, the WMS draws the snapshot of the application A according to the previously received snapshot, and displays the snapshot of the application A after the drawing is successful.
  • the snapshot cache and transmission processes performed by the electronic device both store relevant information of the snapshot, for example, a bitmap.
  • the WMS draws the snapshot based on the relevant information of the previously received snapshot.
  • FIG. 7 it is a snapshot of application A displayed by the electronic device. It can be understood by the time (8:01) displayed in the upper right corner of the interface shown in (a) in Figure 7 and the time (8:00) displayed in the upper right corner of the interface shown in (c) in Figure 5 , in When the application returns from the foreground to the background, the saved snapshot of the application does not include the taskbar (that is, it is not a screenshot of the display screen of the electronic device), and the saved snapshot is a snapshot corresponding to the interface content of application A.
  • Step B34 after the ATMS executes step B30, it needs to send the information of stopping the system desktop to the desktop launcher, so that the electronic device stops running the system desktop.
  • Step B35 after the desktop launcher stops running, send a message to ATMS indicating that the system desktop has stopped running.
  • step B30 is performed after step B29 instead of step B30 after step B33. This is because, when the system is busy or under heavy load, the execution time of step B30 and step B31 may be delayed. If it is delayed until after step B37, the system determines that Activity1 has been obtained, and the steps of drawing and displaying the snapshot will not be executed any more. Therefore, in the embodiment of the present application, step B30 is set before step B32.
  • Step B36 ATMS sends a startup message to application A after receiving the message from the desktop launcher indicating that the system main interface has stopped.
  • steps B35 to B43 are just an example, and other forms of application startup procedures may also be used during specific implementation, which will not be exemplified here in this embodiment of the present application.
  • step B37 application A creates Activity0 through application A's process after receiving the startup message.
  • Step B38 after application A's process create Activity0, resume Activity1 by application A's process.
  • Step B39 after the process of application A resumes Activity1, send a message for adding the interface of Activity1 to ATMS, the message may carry the display parameters of the interface 1 corresponding to Activity1.
  • Step B40 after receiving the message for adding the interface of Activity1 sent by the application A, the ATMS sends a message for adding the interface corresponding to Activity1 to the WMS.
  • the message may also carry display parameters of interface 1 corresponding to Activity1.
  • step B41 after receiving the display parameters of the interface corresponding to Activity1, the WMS returns a message that the addition is successful to the ATMS.
  • the WMS after the WMS receives the display parameters of the interface 1 corresponding to the Activity1, it indicates that the interface of the Activity1 is added successfully, and returns a message that the addition is successful to the ATMS.
  • Step B42 after ATMS receives the message that the interface of Activity1 has been successfully added sent by the snapshot, it returns the message that the interface of Activity1 is successfully added to application A.
  • step B43 application A sends a message indicating that Activity1 resume is completed to ATMS after receiving the message that the interface of Activity1 is successfully added.
  • step B44 ATMS sends an instruction to WMS after receiving the message that Activity1 resume is completed sent by application A, and the instruction is used to instruct WMS to execute the start effect.
  • Step B45 after receiving the instruction sent by the ATMS, the WMS draws and displays the interface 1 corresponding to the Activity1 based on the previously obtained display parameters of the interface of the Activity1.
  • the electronic device will display the interface 1 shown in (b) of FIG. 7 . Since the electronic device can display snapshot1 in advance, it can create Activity0 and resume Activity1 during the display of snapshot1 until the interface 1 corresponding to Activity1 is obtained. The content of the interface 1 is the same as that of the snapshot 1. From the user's point of view, it is considered that the response speed of the application A is faster, thereby improving the user experience.
  • the embodiment of the present application takes Activity0 as an example of an advertising activity for illustration.
  • the behavior of creating any one or more Activities is applicable to the embodiment of the present application. That is, the Activity0 in create Activity0 is not necessarily limited to the advertising activity, but can also be other activities, for example, a blank activity (an activity without an interface), a white page activity (an activity that displays a white interface), etc.
  • the developer of the application has set the application to execute the snapshot process when the application is warm started.
  • the mechanism for invalidating the snapshot process is the embodiment shown in FIG. 5 and FIG. 6 .
  • the snapshot process fails, from the user's point of view, the response speed of the application is slow, which also leads to poor user experience.
  • the embodiment of the present application can solve the problem that the application startup response rate is slow due to the conflict between the application setting and the system setting.
  • FIG. 13 is a schematic flowchart provided by the embodiment of the present application.
  • Step 1301 the electronic device displays a first interface of a first application.
  • the first application is any application software installed in the electronic device.
  • the first interface is any interface displayed when the first application is running in the foreground.
  • Step 1302 the electronic device receives a first operation input by a user.
  • Step 1303 in response to the first operation, the electronic device switches the first application to run in the background.
  • the first operation is any operation of switching the application to the background, for example, the operation of returning to the system desktop (system main interface); call out the multi-task card and click on the task of other applications except the first application in the multi-task card.
  • the operation of the card, the click operation of the icons of other applications other than the first application in the side navigation bar of the electronic device, the click operation of the notification messages of other applications other than the first application on the top of the electronic device, other operations will not Give another example.
  • Step 1304 the electronic device receives a second operation input by the user.
  • the second operation may be any one of the operation in step B13 described above and the operation shown in FIG. 12 .
  • Step 1305 in response to the second operation, the electronic device starts the first application.
  • Step 1306 in the process of starting the first application, if the first application satisfies the preset condition, the electronic device displays the first image, wherein the first image is related to the first interface, and the preset condition includes: the first application The process of the 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 starting;
  • the process has not ended, it means that the process still exists in the system. If the first activity corresponding to the first interface is not destroyed, it means that the first activity is not in the destroy state.
  • the second activity can be any activity other than the first activity.
  • the advertising activity mentioned above can also be a blank activity (an activity displaying a completely white interface), or it can be an application logo activity.
  • Step 1307 after the electronic device resumes the first activity, the electronic device displays the first interface.
  • the first activity is the target Activity
  • the first interface is the interface corresponding to the target Activity.
  • the first interface is also the last interface displayed before the electronic device returns to the background.
  • step 1303 the user can also perform other operations on the electronic device to open other applications, and then return to the system desktop.
  • the electronic device receives a third operation input by the user; in response to the third operation, the electronic device starts the second application and displays the second interface of the second application.
  • the third operation is any operation of starting the second application, for example, clicking the icon of the second application on the system desktop.
  • the second interface of the second application may be the main interface of the second application, or may be an interface displayed before the second application retreated to the background to run last time.
  • the embodiment of the present application also provides a computer-readable storage medium, where a computer program is stored in the computer-readable storage medium, and when the computer program is executed by a processor, the steps in the foregoing method embodiments can be implemented.
  • the embodiment of the present application also provides a computer program product, which enables the first device to implement the steps in the foregoing method embodiments when the computer program product is run on the first device.
  • the integrated unit is realized in the form of a software function unit and sold or used as an independent product, it can be stored in a computer-readable storage medium.
  • all or part of the processes in the methods of the above embodiments in the present application can be completed by instructing related hardware through computer programs, and the computer programs can be stored in a computer-readable storage medium.
  • the computer program includes computer program code, and the computer program code may be in the form of source code, object code, executable file or some intermediate form.
  • the computer-readable medium may at least include: 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, Read-Only Memory), a random-access memory (RAM, Random Access Memory), electrical carrier signals, telecommunication signals, and software distribution media.
  • a recording medium e.g., a hard disk, magnetic disk or optical disk, etc.
  • ROM Read-Only Memory
  • RAM Random Access Memory
  • electrical carrier signals telecommunication signals
  • software distribution media e.g., software distribution media.
  • computer readable media may not be electrical carrier signals and telecommunication signals under legislation and patent practice.
  • the embodiment of the present application also provides a chip system, the chip system includes a processor, the processor is coupled to the memory, and the processor executes the computer program stored in the memory to implement the steps of any method embodiment of the present application.
  • the chip system can be a single chip, or a chip module composed of multiple chips.

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Software Systems (AREA)
  • General Engineering & Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Human Computer Interaction (AREA)
  • Telephone Function (AREA)
  • Stored Programmes (AREA)
  • User Interface Of Digital Computer (AREA)

Abstract

一种应用启动方法、电子设备及可读存储介质,涉及终端应用技术领域。该方法包括:在应用从前台切换到后台运行时,将该应用切换到后台运行前显示的最后界面(即第一界面)保存为快照;在用户点击系统桌面上该应用的图标再次启动该应用时,在该应用的进程未结束、第一界面对应的第一活动未销毁、该应用在启动时需要创建新的活动的情况下,电子设备先显示快照,在电子设备恢复第一活动后,电子设备显示第一活动对应的第一界面。由于应用需要创建新的活动时,先显示该应用的快照,且该应用的快照(即待恢复的活动对应的第一界面的快照)与应用启动后显示的第一界面内容相同,从用户的角度,提高了应用软件的启动响应速度。

Description

应用启动方法、电子设备及可读存储介质
本申请要求于2021年11月30日提交国家知识产权局、申请号为202111449783.8、申请名称为“应用启动方法、电子设备及可读存储介质”的中国专利申请的优先权,其全部内容通过引用结合在本申请中。
技术领域
本申请涉及终端应用领域,尤其涉及应用启动方法、电子设备及可读存储介质。
背景技术
随着电子设备的智能化程度越来越高,电子设备中安装运行的应用软件也越来越多。当用户使用应用软件提供的服务时,用户需要执行操作启动应用软件,例如,用户点击电子设备的系统桌面上应用软件的图标,电子设备可以打开应用软件以显示应用软件提供的界面。
电子设备启动应用软件时电子设备系统内部需要进行处理得到应用软件的界面,所以,在用户的操作结束后,电子设备可能会延迟一段时间才能显示应用软件的界面。目前,从用户的操作结束到电子设备显示应用软件的界面的时间较长,从用户的角度,应用的启动响应速度较慢。
发明内容
本申请提供一种应用启动方法、电子设备及可读存储介质,可以提高应用软件的启动响应速度。
为达到上述目的,本申请采用如下技术方案:
第一方面,本申请提供一种应用启动方法,该方法包括:
电子设备显示第一应用的第一界面;
电子设备接收用户输入的第一操作;
响应于第一操作,电子设备将第一应用切换到后台运行;
电子设备接收用户输入的第二操作;
响应于第二操作,电子设备启动第一应用;
在启动第一应用的过程中,在第一应用满足预设条件的情况下,电子设备显示第一图像,其中,第一图像与第一界面相关,预设条件包括:第一应用的进程未结束、第一界面对应的第一活动未销毁、第一应用在启动时需要创建第二活动;
电子设备恢复第一活动后,电子设备显示第一界面。
在应用需要创建新的活动时,先显示该应用的快照,在显示应用的快照期间,系统内部会创建新的活动,恢复目标活动(上一次退回到后台前显示的界面对应的活动,且未被销毁),得到目标活动对应的界面。由于上一次退回到后台前显示的界面对应的活动与应用启动后恢复的活动为同一活动,所以,应用显示的快照和应用启动后显 示的第一界面内容相同,从用户的角度,提高了应用软件的启动响应速度。
作为本申请第一方面的一种实现方式,电子设备接收用户输入的第一操作后,该方法还包括:
电子设备基于第一界面得到第二图像;
电子设备缓存第二图像,第二图像包含第一图像。
本申请中,第一图像为第一应用的第一界面,缓存的第二图像可以为第一应用的第一界面的图像,还可以是第一应用的第一界面的图像和状态栏的图像。
作为本申请第一方面的一种实现方式,电子设备显示第一图像之前,该方法还包括:
电子设备确定第一应用的进程未结束;
电子设备确定第一界面对应的第一活动未销毁;
电子设备确定第一应用在启动时需要创建第二活动。
作为本申请第一方面的一种实现方式,电子设备包括逻辑判断组件和活动任务管理组件,活动任务管理组件用于记录应用的进程的状态;
电子设备确定第一应用的进程未结束包括:
逻辑判断组件从活动任务管理组件获取第一应用的进程的状态;
逻辑判断组件根据第一应用的进程的状态确定第一应用的进程未结束。
作为本申请第一方面的一种实现方式,电子设备包括逻辑判断组件和活动记录组件,活动记录组件用于记录活动的状态;
电子设备确定第一界面对应的第一活动未销毁包括:
逻辑判断组件从活动记录组件获取第一活动的状态;
逻辑判断组件根据第一活动的状态确定第一活动未销毁。
作为本申请第一方面的一种实现方式,电子设备包括活动任务管理组件,活动任务管理组件用于在第一应用启动时向逻辑判断组件发送第一应用的启动信息,第一应用的启动信息包括第一应用启动时的目标活动;
逻辑判断组件从活动记录组件获取第一活动的状态之前,该方法还包括:
逻辑判断组件接收活动任务管理组件发送的第一应用的启动信息;
逻辑判断组件根据第一应用的启动信息确定第一应用启动时的目标活动为第一活动。
作为本申请第一方面的一种实现方式,电子设备包括逻辑判断组件和活动任务管理组件,活动任务管理组件用于在第一应用启动时向逻辑判断组件发送第一应用的启动信息,第一应用的启动信息包括创建第二活动;
电子设备确定第一应用在启动时需要创建第二活动之前,该方法还包括:
逻辑判断组件接收活动任务管理组件发送的第一应用的启动信息;
电子设备确定第一应用在启动时需要创建第二活动,包括:
逻辑判断组件根据第一应用的启动信息确定第一应用在启动时需要创建第二活动。
作为本申请第一方面的一种实现方式,电子设备还包括桌面启动器;
电子设备接收用户输入的第二操作,具体为:
桌面启动器接收用户输入的第二操作;
该方法还包括:
响应于第二操作,桌面启动器向活动任务管理组件发送第一应用的启动指令;
响应于接收启动指令,活动任务管理组件获取第一应用的启动信息;
活动任务管理组件向逻辑判断组件发送第一应用的启动信息。
作为本申请第一方面的一种实现方式,电子设备包括:活动任务管理组件、逻辑判断组件、快照模块和WMS;
电子设备缓存第二图像,包括:
快照模块缓存第二图像;
在第一应用满足预设条件的情况下,电子设备显示第一图像,包括:
逻辑判断组件判断第一应用满足预设条件的情况下,逻辑判断组件向活动任务管理组件发送第一信息,第一信息用于表示第一应用满足预设条件;
活动任务管理组件接收到第一信息的情况下,向快照模块发送第二信息,第二信息用于指示快照模块向WMS发送第二图像;
快照模块向WMS发送第二图像;
WMS基于第二图像,控制电子设备显示第一图像。
作为本申请第一方面的一种实现方式,电子设备包括:活动记录组件;
活动任务管理组件向快照模块发送第二信息包括:
活动任务管理组件通过活动记录组件向快照模块发送第二信息。
作为本申请第一方面的一种实现方式,第一图像与第二图像相同,第一图像与第一界面的图像相同;
或者,第一图像与第一界面的图像相同,第二图像包括第一界面的图像和第一状态栏内容,第一状态栏内容为电子设备缓存第二图像时电子设备的状态栏内容。
在本申请中,将应用退回到后台前保存的应用的快照记为第二图像。本申请实施例将应用再次启动时显示的快照记为第一图像。保存的快照(第二图像)包括第一应用的第一界面,可以包括状态栏(截图时刻的状态栏内容)也可以不包括状态栏。而显示的快照(第一图像)为包含第一应用的第一界面、且不包括状态栏内容的图像。电子设备显示第一图像时,在第二图像不包括状态栏(截图时刻的状态栏内容)时,需要合成保存的第二图像和当前的状态栏内容;在第二图像包括状态栏(截图时刻的状态栏内容)时,将系统当前的状态栏内容覆盖第二图像的状态栏区域;或者对第二图像进行截图处理得到包含第一应用的第一界面、且不包含状态栏内容的第一图像,然后电子设备显示该第一图像时,合成该第一图像和状态栏内容。
作为本申请第一方面的一种实现方式,在快照模块向WMS发送第二图像之后,该方法还包括:
快照模块向活动任务管理组件发送第二图像添加成功的信息;
响应于接收到第二图像添加成功的信息,活动任务管理组件通过快照模块向WMS发送第一指令;第一指令用于指示WMS基于第二图像,控制电子设备显示第一图像。
作为本申请第一方面的一种实现方式,电子设备包括活动记录组件;
快照模块向活动任务管理组件发送第二图像添加成功的信息包括:
快照模块通过活动记录组件向活动任务管理组件发送第二图像添加成功的信息。
作为本申请第一方面的一种实现方式,第二操作为作用在电子设备的系统桌面上显示的第一应用的图标的操作,电子设备还包括:桌面启动器;
活动任务管理组件通过快照模块向WMS发送第一指令之后,该方法还包括:
活动任务管理组件向桌面启动器发送第三信息,第三信息用于指示桌面启动器停止显示系统桌面。
作为本申请第一方面的一种实现方式,快照模块缓存第二图像包括:
快照模块将第二图像缓存在快照缓存文件中;
相应的,快照模块向WMS发送第二图像包括:
快照模块从快照缓存文件获取第二图像;
快照模块向WMS发送第二图像。
作为本申请第一方面的一种实现方式,电子设备接收用户输入的第二操作之前,该方法还包括:
电子设备接收用户输入的第三操作;
响应于第三操作,电子设备启动第二应用并显示第二应用的第二界面。
在第一应用退回到后台运行后,用户可以在电子设备上进行其他操作,例如,通过第三操作启动第二应用;还可以将第二应用再退回到后台,使得电子设备显示系统桌面。当然,在第一应用退回到后台后,用户可以启动多个应用之后,再回到系统桌面。或者电子设备在未回到系统桌面的情况下,通过其他应用启动第一应用。
作为本申请第一方面的一种实现方式,电子设备恢复第一活动之前,该方法还包括:
电子设备创建第二活动。
作为本申请第一方面的一种实现方式,第一操作包括:在电子设备的触控屏上的手势操作;或,在电子设备的摄像头视野内的隔空手势操作。
本申请中,第一操作可以是任意在电子设备显示第一应用的第一界面时,将第一应用从前台运行切换到后台运行的操作。
第二方面,提供一种电子设备,包括处理器,处理器用于运行存储器中存储的计算机程序,实现本申请第一方面任一项的方法。
第三方面,提供一种芯片系统,包括处理器,处理器与存储器耦合,处理器执行存储器中存储的计算机程序,以实现本申请第一方面任一项的方法。
第四方面,提供一种计算机可读存储介质,计算机可读存储介质存储有计算机程序,计算机程序被一个或多个处理器执行时实现本申请第一方面任一项的方法。
第五方面,本申请提供了一种计算机程序产品,当计算机程序产品在设备上运行时,使得设备执行本申请第一方面任一项的方法。
可以理解的是,上述第二方面至第五方面的有益效果可以参见上述第一方面中的相关描述,在此不再赘述。
附图说明
图1为本申请实施例提供的一种电子设备的硬件结构示意图;
图2为本申请实施例提供的一种应用启动时表示应用响应时长的示意图;
图3为本申请实施例提供的一种应用启动时的界面示意图;
图4为本申请实施例提供的另一应用启动时的界面示意图;
图5为本申请实施例提供的另一应用启动时的界面示意图;
图6为本申请实施例提供的另一应用启动时的界面示意图;
图7为本申请实施例提供的另一应用启动时的界面示意图;
图8为本申请实施例提供的另一应用启动时的界面示意图;
图9为本申请实施例提供的另一应用启动时的界面示意图;
图10为本申请实施例提供的应用启动方法的技术架构图;
图11为本申请实施例提供的应用启动方法的时序图;
图12为本申请实施例提供的启动应用的方式的示意图;
图13为本申请实施例提供的应用启动时的流程示意图。
具体实施方式
以下描述中,为了说明而不是为了限定,提出了诸如特定系统结构、技术之类的具体细节,以便透彻理解本申请实施例。然而,本领域的技术人员应当清楚,在没有这些具体细节的其它实施例中也可以实现本申请。
应当理解,当在本申请说明书和所附权利要求书中使用时,术语“包括”指示所描述特征、整体、步骤、操作、元素和/或组件的存在,但并不排除一个或多个其它特征、整体、步骤、操作、元素、组件和/或其集合的存在或添加。
还应当理解,在本申请实施例中,“一个或多个”是指一个、两个或两个以上;“和/或”,描述关联对象的关联关系,表示可以存在三种关系;例如,A和/或B,可以表示:单独存在A,同时存在A和B,单独存在B的情况,其中A、B可以是单数或者复数。字符“/”一般表示前后关联对象是一种“或”的关系。
另外,在本申请说明书和所附权利要求书的描述中,术语“第一”、“第二”、“第三”、“第四”等仅用于区分描述,而不能理解为指示或暗示相对重要性。
在本申请说明书中描述的参考“一个实施例”或“一些实施例”等意味着在本申请的一个或多个实施例中包括结合该实施例描述的特定特征、结构或特点。由此,在本说明书中的不同之处出现的语句“在一个实施例中”、“在一些实施例中”、“在其他一些实施例中”、“在另外一些实施例中”等不是必然都参考相同的实施例,而是意味着“一个或多个但不是所有的实施例”,除非是以其他方式另外特别强调。术语“包括”、“包含”、“具有”及它们的变形都意味着“包括但不限于”,除非是以其他方式另外特别强调。
本申请实施例提供的一种应用启动方法,可以适用于电子设备中。该电子设备可以为平板电脑、手机、可穿戴设备、笔记本电脑、超级移动个人计算机(ultra-mobile personal computer,UMPC)、上网本、个人数字助理(personal digital assistant,PDA)等电子设备。本申请实施例对电子设备的具体类型不作限定。
图1示出了一种电子设备的结构示意图。电子设备100可以包括处理器110,外部存储器接口120,内部存储器121,通用串行总线(universal serial bus,USB)接口130,充电管理模块140,电源管理模块141,电池142,天线1,天线2,移动通信模块150,无线通信模块160,音频模块170,扬声器170A,受话器170B,麦克风170C,耳机接口170D,传感器模块180,按键190,马达191,摄像头193,显示屏194,以及用户标识模块(subscriber identification module,SIM)卡接口195等。其中,传感器模块180可以包括压力传感器180A, 触摸传感器180K等。
可以理解的是,本申请实施例示意的结构并不构成对电子设备100的具体限定。在本申请另一些实施例中,电子设备100可以包括比图示更多或更少的部件,或者组合某些部件,或者拆分某些部件,或者不同的部件布置。图示的部件可以以硬件,软件或软件和硬件的组合实现。
处理器110可以包括一个或多个处理单元,例如:处理器110可以包括应用处理器(application processor,AP),调制解调处理器,图形处理器(graphics processing unit,GPU),图像信号处理器(image signal processor,ISP),控制器,存储器,视频编解码器,数字信号处理器(digital signal processor,DSP),基带处理器,和/或神经网络处理器(neural-network processing unit,NPU)等。其中,不同的处理单元可以是独立的器件,也可以集成在一个或多个处理器中。例如,处理器110用于执行本申请实施例中的应用启动方法。
其中,控制器可以是电子设备100的神经中枢和指挥中心。控制器可以根据指令操作码和时序信号,产生操作控制信号,完成取指令和执行指令的控制。
处理器110中还可以设置存储器,用于存储指令和数据。在一些实施例中,处理器110中的存储器为高速缓冲存储器。该存储器可以保存处理器110刚用过或循环使用的指令或数据。如果处理器110需要再次使用该指令或数据,可从存储器中直接调用。避免了重复存取,减少了处理器110的等待时间,因而提高了系统的效率。
USB接口130是符合USB标准规范的接口,具体可以是Mini USB接口,Micro USB接口,USB Type C接口等。USB接口130可以用于连接充电器为电子设备100充电,也可以用于电子设备100与外围设备之间传输数据。
外部存储器接口120可以用于连接外部存储卡,例如Micro SD卡,实现扩展电子设备100的存储能力。外部存储卡通过外部存储器接口120与处理器110通信,实现数据存储功能。例如将音乐,视频等文件保存在外部存储卡中。
内部存储器121可以用于存储计算机可执行程序代码,可执行程序代码包括指令。处理器110通过运行存储在内部存储器121的指令,从而执行电子设备100的各种功能应用以及数据处理。内部存储器121可以包括存储程序区和存储数据区。其中,存储程序区可存储操作系统,至少一个功能所需的应用程序(比如声音播放功能,图像播放功能等)。
此外,内部存储器121可以包括高速随机存取存储器,还可以包括非易失性存储器,例如至少一个磁盘存储器件,闪存器件,通用闪存存储器(universal flash storage,UFS)等。
充电管理模块140用于从充电器接收充电输入。其中,充电器可以是无线充电器,也可以是有线充电器。在一些有线充电的实施例中,充电管理模块140可以通过USB接口130接收有线充电器的充电输入。
电源管理模块141用于连接电池142,充电管理模块140与处理器110。电源管理模块141接收电池142和/或充电管理模块140的输入,为处理器110,内部存储器121,外部存储器,显示屏194,摄像头193,和无线通信模块160等供电。
在其他一些实施例中,电源管理模块141也可以设置于处理器110中。在另一些实施例中,电源管理模块141和充电管理模块140也可以设置于同一个器件中。
电子设备100的无线通信功能可以通过天线1,天线2,移动通信模块150,无线通信模块160,调制解调处理器以及基带处理器等实现。
天线1和天线2用于发射和接收电磁波信号。电子设备100中的每个天线可用于覆盖单个或多个通信频带。不同的天线还可以复用,以提高天线的利用率。例如:可以将天线1复用为无线局域网的分集天线。在另外一些实施例中,天线可以和调谐开关结合使用。
移动通信模块150可以提供应用在电子设备100上的包括2G/3G/4G/5G等无线通信的解决方案。移动通信模块150可以包括至少一个滤波器,开关,功率放大器,低噪声放大器(low noise amplifier,LNA)等。移动通信模块150可以由天线1接收电磁波,并对接收的电磁波进行滤波,放大等处理,传送至调制解调处理器进行解调。移动通信模块150还可以对经调制解调处理器调制后的信号放大,经天线1转为电磁波辐射出去。
无线通信模块160可以提供应用在电子设备100上的包括无线局域网(wireless local area networks,WLAN)(如无线保真(wireless fidelity,Wi-Fi)网络),蓝牙(bluetooth,BT),全球导航卫星系统(global navigation satellite system,GNSS),调频(frequency modulation,FM),近距离无线通信技术(near field communication,NFC),红外技术(infrared,IR)等无线通信的解决方案。无线通信模块160可以是集成至少一个通信处理模块的一个或多个器件。无线通信模块160经由天线2接收电磁波,将电磁波信号调频以及滤波处理,将处理后的信号发送到处理器110。无线通信模块160还可以从处理器110接收待发送的信号,对其进行调频,放大,经天线2转为电磁波辐射出去。
在一些实施例中,电子设备100的天线1和移动通信模块150耦合,天线2和无线通信模块160耦合,使得电子设备100可以通过无线通信技术与网络以及其他设备通信。
电子设备100可以通过音频模块170,扬声器170A,受话器170B,麦克风170C,耳机接口170D,以及应用处理器等实现音频功能。例如音乐播放,录音等。
音频模块170用于将数字音频信号转换成模拟音频信号输出,也用于将模拟音频输入转换为数字音频信号。音频模块170还可以用于对音频信号编码和解码。在一些实施例中,音频模块170可以设置于处理器110中,或将音频模块170的部分功能模块设置于处理器110中。
扬声器170A,也称“喇叭”,用于将音频电信号转换为声音信号。电子设备100可以通过扬声器170A收听音乐,或收听免提通话。
受话器170B,也称“听筒”,用于将音频电信号转换成声音信号。当电子设备100接听电话或语音信息时,可以通过将受话器170B靠近人耳接听语音。
麦克风170C,也称“话筒”,“传声器”,用于将声音信号转换为电信号。当拨打电话或发送语音信息时,用户可以通过人嘴靠近麦克风170C发声,将声音信号输入到麦克风170C。电子设备100可以设置至少一个麦克风170C。在另一些实施例中,电子设备100可以设置两个麦克风170C,除了监听语音信息,还可以实现降噪功能。在另一些实施例中,电子设备100还可以设置三个,四个或更多麦克风170C,实现采集声音信号,降噪,还可以识别声音来源,实现定向录音功能等。
耳机接口170D用于连接有线耳机。耳机接口170D可以是USB接口130,也可以是3.5mm的开放移动电子设备平台(open mobile terminal platform,OMTP)标准接口,美国蜂窝电信工业协会(cellular telecommunications industry association of the USA, CTIA)标准接口。
压力传感器180A用于感受压力信号,可以将压力信号转换成电信号。在一些实施例中,压力传感器180A可以设置于显示屏194。压力传感器180A的种类很多,如电阻式压力传感器,电感式压力传感器,电容式压力传感器等。电容式压力传感器可以是包括至少两个具有导电材料的平行板。当有力作用于压力传感器180A,电极之间的电容改变。电子设备100根据电容的变化确定压力的强度。当有触摸操作作用于显示屏194,电子设备100根据压力传感器180A检测触摸操作强度。电子设备100也可以根据压力传感器180A的检测信号计算触摸的位置。
触摸传感器180K,也称“触控面板”。触摸传感器180K可以设置于显示屏194,由触摸传感器180K与显示屏194组成触摸屏,也称“触控屏”。触摸传感器180K用于检测作用于其上或附近的触摸操作。触摸传感器可以将检测到的触摸操作传递给应用处理器,以确定触摸事件类型。可以通过显示屏194提供与触摸操作相关的视觉输出。在另一些实施例中,触摸传感器180K也可以设置于电子设备100的表面,与显示屏194所处的位置不同。
按键190包括开机键,音量键等。按键190可以是机械按键。也可以是触摸式按键。电子设备100可以接收按键输入,产生与电子设备100的用户设置以及功能控制有关的键信号输入。
马达191可以产生振动提示。马达191可以用于来电振动提示,也可以用于触摸振动反馈。
电子设备100通过GPU,显示屏194,以及应用处理器等实现显示功能。GPU为图像处理的微处理器,连接显示屏194和应用处理器。GPU用于执行数学和几何计算,用于图形渲染。处理器110可包括一个或多个GPU,其执行程序指令以生成或改变显示信息。
显示屏194用于显示图像,视频等。在一些实施例中,电子设备100可以包括1个或N个显示屏194,N为大于1的正整数。
摄像头193用于捕获静态图像或视频。在一些实施例中,电子设备100可以包括1个或N个摄像头193,N为大于1的正整数。
SIM卡接口195用于连接SIM卡。SIM卡可以通过插入SIM卡接口195,或从SIM卡接口195拔出,实现和电子设备100的接触和分离。电子设备100可以支持1个或N个SIM卡接口,N为大于1的正整数。
本申请实施例并未特别限定一种应用启动方法的执行主体的具体结构,只要可以通过运行记录有本申请实施例的一种应用启动方法的代码,以根据本申请实施例提供的一种应用启动方法进行处理即可。例如,本申请实施例提供的一种应用启动方法的执行主体可以是电子设备中能够调用程序并执行程序的功能模块,或者为应用于电子设备中的处理装置,例如,芯片。
图1所示的电子设备中可以安装并运行应用。电子设备在前台运行应用A(电子设备中安装的任一应用程序)时,电子设备的显示屏显示应用A的界面,电子设备的使用者可以与电子设备的显示屏当前显示的应用A的界面进行交互操作。电子设备在后台运行应用A时,电子设备不再显示应用A的界面,电子设备的使用者不能与应用A的界面进行交互操作;当然,应用A在后台运行过程中可以接收到其他信息(例如, 即时通讯应用可以接收其他用户发送的消息)并将该其他信息通知用户。
用户在使用电子设备过程中,若应用A未运行(未在后台运行也未在前台运行),用户通过电子设备桌面上的应用A的图标启动应用A,电子设备首先为该应用创建进程。在应用A的进程已经创建成功的情况下,通过该进程运行应用A的Activity(例如Activity1),Activity1进入任务栈,且位于任务栈的顶部,电子设备显示Activity1对应一个界面1。用户可以通过Activity1对应的界面1进行交互操作,若该交互操作将使得电子设备显示另一新的界面,则系统中应用A的进程运行另一新的Activity(例如Activity2),该Activity2将进入任务栈且位于任务栈顶部,旧的Activity1将被推入任务栈的下面。相应的,电子设备的显示屏显示Activity2对应的界面2,旧的Activity1的界面被销毁。当然,用户可以通过在Activity2对应的界面2上进行交互操作(例如,返回操作),使得任务栈中的Acitivity1回到任务栈的顶部,则Activity2被销毁,相应的,电子设备的显示屏显示任务栈顶部Activity1对应的界面1。
通过上述描述可以理解,应用显示的各个界面依赖于应用的进程运行各个Activity。另外,在应用从前台进入后台运行后,该应用的进程可以依然存在于系统中(例如,该应用的进程未消亡)。当然,在应用从前台进入后台运行后,该应用的进程也可能被销毁,即系统后台不存在该应用的进程。
应用A启动时,若电子设备系统后台不存在应用A的进程,则系统需要为应用A创建新的进程,将这种启动过程记为冷启动。
应用A启动时,若电子设备系统后台存在应用A的进程,则系统不再需要为应用A创建进程,将这种启动过程记为热启动。
本申请实施例可以应用在应用的热启动场景中,参见图2,为本申请实施例提供的一种应用场景。参见图2中的(a),电子设备显示系统桌面,用户点击电子设备的系统桌面上的应用A的图标(例如,视频图标)。示例性的,在电子设备显示图2中的(a)显示的系统桌面时,系统后台存在应用A的进程。在用户点击应用A的图标后,经过一段时间,电子设备显示应用A的界面,参见图2中的(b)。本申请实施例用于提高电子设备从图2中的(a)所示的点击操作到显示图2中的(b)对应的应用A的界面之间的响应速度。本申请实施例中,图2中的(b)对应的界面为应用A上一次从前台退回到后台运行时显示的最后界面。
当然,实际应用中,从图2中的(a)对应的界面(系统桌面对应的界面)到图2中的(b)对应的应用A界面中间也可以显示其他界面,例如,应用A启动时的广告界面。中间也可以显示动效,例如,应用A的图标从彩色图标变为灰度图标后再变为彩色图标的过程对应的动画等。
当然,实际应用中,从图2中的(a)对应的界面到图2中的(b)对应的界面中间也可以不显示其他界面,例如,用户点击应用A的图标后,在图2中的(a)对应的界面停留一段时间,直到显示图2中的(b)对面的界面。
本申请实施例中,电子设备从前台到后台运行之前显示的最后界面可以记为界面A。电子设备进入后台运行后,用户可以点击桌面上应用A的图标(参见图2中的(a))将应用A切换到前台运行。在热启动场景中,在应用A从后台到前台运行前,虽然应用A的进程未被销毁,然而界面A已经被销毁。电子设备检测到应用A的图标的点 击操作后,需要采用应用A的进程重新绘制界面A。若电子设备的系统负载较重,或者界面A较为复杂,或者电子设备的内存已经被换出(例如,应用A的进程下的一些数据被从内存换到磁盘保存),则电子设备绘制界面A需要的时间较长,导致响应速度较慢,影响用户体验。
本申请实施例可以设置应用在被切换到后台时保存该应用切换到后台前显示的最后界面的快照。本申请实施例中的快照均表示应用上一次切换到后台前显示的最后界面的快照。在应用热启动(该应用从后台进入前台运行时,该应用的进程未被终止)的情况,首先显示该应用切换到后台前显示的最后界面的快照,在该应用被切换到后台时的任务栈顶部的Activity被恢复(resume)得到该Activity对应的界面后,再显示得到的界面。通常,应用被切换到后台前任务栈顶部的Activity对应的界面为该应用切换到后台前显示的最后界面。
为对上述示例具有更清晰的理解,首先通过图3至图9描述应用启动时快照的显示逻辑图。
参见图3至图4,为本申请实施例提供的一种应用场景。图3中的(a),电子设备显示系统桌面,用户点击系统桌面中的应用A(例如,视频应用)的图标。此时,系统后台中不存在应用A的进程,即应用A为冷启动。
在应用A的冷启动过程中,首先系统为应用A创建应用A的进程,在为应用A创建进程后,应用A的进程启动应用A的主Activity并绘制主Activity对应的界面。
由于应用A的冷启动过程时间较长,在用户的视角,用户点击应用A的图标后,电子设备的界面可能还是显示原界面(系统桌面),参见图3中的(b)。
图3所示实施例以应用A冷启动时不存在广告界面为例。在电子设备显示原界面(应用A所在的界面,该界面可以为系统桌面)的过程中,也可以增加其他动画效果,例如,将该被点击的应用A的应用图标由彩色图标变为灰度图标后再变为彩色图标;或者将该应用图标放大预设倍数后再变为原大小。当然,上述应用图标的变化依然以该应用图标所在的界面(应用A所在的系统桌面)为背景的动画效果。本申请实施例可以将上述应用图标的变化过程理解为显示原界面(应用A所在的系统桌面)。
参见图3中的(c),在应用A的进程绘制主Activity对应的界面之后,电子设备显示主Activity对应的界面。
从用户的角度,从图3中的(a)对应的点击操作到显示图3中的(c)对应的应用界面经过的时间较长,应用A的启动响应较慢。
在电子设备显示图3中的(c)所示的应用A(例如,视频应用)的界面之后,用户在界面上进行底部上滑操作,以使应用从前台进入后台,并使得电子设备显示图3中的(e)所示的系统桌面。为便于描述,将应用从前台进入后台之前,电子设备显示的界面记为界面1,将界面1对应的Activity记为Activity1。在应用从前台进入后台前,Activity1对应的界面1被作为快照(snapshot1)保存。
参见图3中的(d),此时得到的快照为对Activity1对应界面1截图得到的图像。通过图3中的(d)可以理解,虽然电子设备当前显示的界面由应用A的界面和状态栏组成。但是保存的快照为应用A的界面对应的图像,该图像中不包括状态栏部分。
当然,图3中的(d)仅用于示例,实际应用中,得到的快照还可以为对电子设备 当前显示的界面进行截图得到的图像。该图像包括应用A的界面和状态栏部分。
用户在图3中的(e)所示的系统桌面上点击应用A的图标,在用户点击应用A的图标之前,应用A的进程未被销毁,即应用A为热启动。当应用A热启动时,若不需要创建Activity1以外的其他Activity。则系统首先显示快照snapshot1,参见图4中的(a)。
需要说明,图4中的(a)所示的snapshot1为系统合成的快照和状态栏。若之前保存的快照为应用A的界面对应的图像(不包括状态栏),则显示的snapshot1为系统合成的快照图层和状态栏图层。若之前保存的快照为电子设备当前显示的界面对应的图像(包括状态栏),则显示的snapshot1为系统通过状态栏图层覆盖快照图层后的界面。
本申请实施例将应用退回到后台前保存的应用的快照记为第二图像。本申请实施例将应用再次启动时显示的快照记为第一图像。由于保存的快照(第二图像)可以包括状态栏(截图时刻的状态栏内容)也可以不包括状态栏,而显示的快照(第一图像)为不包括状态栏的图像。电子设备显示第一图像时,需要合成保存的第二图像和当前的状态栏内容,或将当前的状态栏内容覆盖第二图像的状态栏区域。
作为另一示例,电子设备也可以对第二图像进行截图处理得到包含第一应用的第一界面、且不包含状态栏内容(截图时刻的状态栏内容)的第一图像,然后电子设备显示该第一图像时,合成该第一图像和电子设备当前的状态栏内容。
在显示snapshot1的过程中,系统resume Activity1,得到该Activity1对应的界面1,在得到该Activity1对应的界面1之后,电子设备由显示snapshot1变为显示界面1,参见图4中的(b)。
如前所述,由于snapshot1为应用A的Activity1对应的界面的快照,界面1为应用A的Activity1对应的界面,所以,图4中的(a)和图4中的(b)中电子设备显示的界面相同。
基于图3中的(c)、图3中的(d)、图3中的(e)、图4中的(a)和图4中的(b)所示,在应用A的热启动开始时刻,若应用A的进程只需要resume Activity(例如,Activity1),不需要create其他Activity,则电子设备的Activity变化和窗口变化可以参见图4中的(c)所示的时间进度图。电子设备从热启动开始时刻开始,首先绘制snapshot1,绘制snapshot1期间,电子设备显示应用A的图标所在的原界面(例如,系统桌面)。在绘制得到snapshot1之后,电子设备由显示系统桌面变更为显示snapshot1。电子设备显示snapshot1期间,应用A的进程resume Activity1,在得到Activity1对应的界面1的时刻,电子设备由显示snapshot1变为显示界面1。从用户的角度,用户认为应用A的启动响应时间为用户点击应用A的图标的时刻(可以认为等同于热启动开始时刻)至电子设备显示snapshot1的时刻。由于snapshot1为图片格式,绘制该图片格式的snapshot1通常耗时较短,从用户的角度,应用启动的响应很快,提高用户体验。
参见图5至图6,为本申请实施例提供的另一应用场景。图5中的(a),电子设备显示系统桌面,用户点击系统桌面中的应用A(例如,视频应用)的图标。此时,系统后台中不存在应用A的进程,即应用A为冷启动。
在应用A的冷启动过程中,首先系统为应用A创建应用A的进程,在为应用A创建进程后,应用A的进程启动应用A的主Activity并绘制主Activity对应的界面。实际应用中,也可以先创建应用A的进程,在应用A的进程启动后,通过应用A的进程创建(create)广告Activity,得到并显示广告Activity对应的界面,参见图5中的(b)所示广告界面,在显示广告Activity对应的广告界面的过程中,通过应用A的进程启动应用A的主Activity并绘制主Activity对应的界面。
同理,在为应用A创建进程,通过进程创建(create)广告Activity,得到广告Activity对应的界面的过程中,也可以增加图3和图4所示实施例中描述的动画效果,在此不再赘述。
参见图5中的(c),在应用A的进程绘制主Activity对应的界面之后,电子设备由显示广告界面变为显示主Activity对应的界面。
在电子设备显示图5中的(c)所示的应用A(例如,视频应用)的界面之后,用户在界面上进行底部上滑操作,以使应用从前台进入后台,并使得电子设备显示图5中的(d)所示的系统桌面。为便于描述,将应用从前台进入后台之前,电子设备显示的界面记为界面1,将界面1对应的Activity记为Activity1。在应用从前台进入后台前,Activity1对应的界面1被作为快照(snapshot1)保存。
用户在图5中的(d)所示的系统桌面上点击应用A的图标,需要说明,在电子设备显示图5中的(d)所示的界面至用户点击该界面中的应用A的图标中间可以经过一段时间,该段时间,用户还可以通过电子设备进行其他操作,例如,点击应用B(电子设备中应用A以外的其他应用)的图标,使得应用B到前台运行,在应用B退回到后台运行后,电子设备显示系统桌面。
在用户点击应用A的图标之前,应用A的进程未被销毁,即应用A为热启动。当应用A热启动时,由于预先为应用A设置了显示广告界面,即需要在resume Activity1之前,需要预先create Activity0。本申请实施例中,Activity0为预先设置的广告Activity,在实际应用中,应用A的开发者可以设置:应用A每次启动时,均会create Activity0,可以在冷启动时显示Activity0对应的广告界面,在热启动时可以显示也可以不显示Activity0对应的广告界面,具体采用何种设置可以由应用A的开发者确定。
在应用启动阶段,若存在创建(create)Activity的行为,为避免新建的Activity对应的界面和该应用上一次退回到后台时保存的快照不对应,电子设备的系统通常会设置快照流程不生效。即不再显示上一次退回到后台时保存的该应用的最后界面的快照。
为避免频繁显示广告,降低用户的体验度,应用A的开发者可能会设置:在应用的热启动阶段,设置不显示Activity0对应的广告界面,即应用A的进程可以create Activity0,但是不显示Activity0对应的广告界面。那么在用户点击应用A的图标开始热启动后,电子设备会显示用户点击应用A的图标时电子设备显示的应用A的图标所在的原界面(系统桌面),参见图6中的(a)。在显示应用A的图标所在的原界面的过程中,应用A的进程create Activity0,resume Activity1。
参见图6中的(b),为resume Activity1之后得到的Activity1对应的界面1。
参照图6中的(c),在应用A热启动时存在create Activity的场景的情况下,无 论显示广告页面,还是不显示广告界面(图6中的(c)以不显示广告界面为例),从用户点击应用A的图标直到电子设备显示Activity1对应的界面1经历的时间均显示系统桌面,从用户的角度,应用的启动响应速度较慢。
为解决上述问题,在应用热启动时需要创建其他Activity的情况下,可以按照图7所述的显示逻辑进行热启动时的界面显示过程。
参见图7,电子设备在显示图7中的(a)之前,与图5中的(a)至图5中的(d)所示的场景相同。具体可参照图5中的(a)至图5中的(d)的相关描述,在此不再赘述。
图7所示应用场景中,在应用启动时,增加判断逻辑:判断当前切换到前台的应用是否为热启动,该应用被切换到后台时是否保存了快照;该应用的快照对应的界面对应的Activity是否未被销毁(为避免热启动后应用A显示的界面和快照内容不相符);该应用在显示上一次切换到后台时的界面的过程中是否会create其他Activity。若上述判断逻辑均为是,则强制执行以下内容:
在应用启动时,系统首先绘制并显示快照(snapshot1),参见图7中的(a)所示的界面,另外,参见图7中的(c),在绘制快照(snapshot1)的过程中,电子设备显示应用A的图标所在的界面(例如,系统桌面)。在电子设备绘制完成快照(snapshot1)之后,电子设备的窗口由显示系统桌面变为显示snapshot1。电子设备显示snapshot1期间,应用A的进程create Activity0、resume Activity1,在resume Activity1后得到Activity1对应的界面1,在得到界面1之后,系统将由显示快照(snapshot1)变为显示界面1,参见图7中的(b)所示的界面。
图7中应用热启动的过程也可以理解为,在应用的热启动时,有创建Activity,且快照对应的Activity未被销毁的情况下,强制在创建Activity的阶段显示保存的快照,直到系统得到最终显示的界面(应用上一次切换到后台前的任务栈顶部的Activity对应的界面)。
需要说明,应用A上一次退回到后台前,应用A的Activity1对应的界面生成的快照图像;在应用A启动时,应用A的进程resumeActivity1之后,电子设备显示的界面为Activity1对应的界面。理论上,在应用A上一次退回到后台前Activity1对应的界面(或界面生成的快照)和应用A本次启动后显示的Activity1对应的界面的内容是相同的。
然而,在实际应用中,应用A启动后显示的Activity1对应的界面和之前保存的快照的内容可能存在一些差异,例如,在Activity1对应的界面可以动态显示两个(或两个以上)的图像进行滑动切换的场景时,若截图生成快照的时刻刚好处于图像滑动切换的时刻,则截图生成的快照可能显示两个图像中的各半张。在应用再次启动后,电子设备显示的界面可能为Activity1对应的界面中图像滑动切换后的界面。当然,快照对应的界面和电子设备启动后的界面基于同一Activity得到,因此,快照中的内容和电子设备启动后显示的界面的内容的布局基本一致,即使存在部分内容的差异,从用户的角度,也通常会认为是该界面中的动画的正常播放。
基于该理解,若应用A退回到后台前显示一个界面,应用A再次回到前台运行时,启动后也显示一个界面,若两个界面对应于同一Activity,即使两个界面显示的内容略 有差异,也可以认为两个界面为同一界面。这是由于通常一个Activity对应一个界面,两个界面基于同一Activity生成,则两个界面的基本框架相同,即使两个界面的具体内容略有差异,两个界面也属于同一界面。
上述实施例均以在电子设备显示应用A的主界面的情况下,应用A被退回到后台为例进行说明,本申请实施例通过图8和图9描述电子设备显示应用A的非主界面的情况下,应用A被退回到后台为例进行说明。
参见图8,图8中的(a)和(b)参照图5中的(a)和(b)为例进行说明,可以理解,该应用A在启动时存在创建Activity的行为(例如,广告界面对应的Activity)。在电子设备显示广告界面一段时间之后,显示图8中的(c)所示的应用A的主界面(Activity1对应的界面1)。
在电子设备显示图8中的(c)所示的界面1的情况下,用户点击界面1中的控件,电子设备显示另一界面,该界面为应用A的Activity2对应的界面2。
参见图8中的(d),为电子设备显示的应用A的Activity2对应的界面2。若用户此时通过图8中的(d)所示的手势回到系统桌面,则电子设备显示图8中的(e)所示的系统桌面。当然,电子设备显示图8中的(e)所示的系统桌面之前,电子设备保存Activity2对应的界面2为应用A的快照(snapshot2)。
在图8中的(e)所示的界面中,若用户在系统桌面点击应用A的图标,系统内部增加判断逻辑:判断当前切换到前台的应用是否为热启动,该应用被切换到后台时是否保存了快照;该应用的快照对应的界面对应的Activity是否未被销毁;该应用在显示上一次切换到后台时的界面的过程中是否会create其他Activity。若上述判断逻辑均为是,则强制执行以下内容:
参见图9中的(a)所示的界面,在应用A启动时,系统首先绘制并显示快照(snapshot2),另外,参见图9中的(c),在绘制快照(snapshot2)的过程中,电子设备显示应用A的图标所在的界面(例如,系统桌面)。在电子设备绘制完成快照(snapshot2)之后,电子设备的窗口由显示系统桌面变为显示snapshot2。电子设备显示snapshot2期间,应用A的进程create Activity0、resume Activity2,在resume Activity2后得到Activity2对应的界面2,在得到界面2之后,系统将由显示快照(snapshot2)变为显示界面2,具体可参见图9中的(b)所示的界面。
为对上述所示实施例具有更清晰的理解,参照图10所示的技术架构图。本申请实施例提供的技术架构图包括应用层和框架层。图10所示技术架构仅为其中一个示例,在实际应用中,还可以包括比图10所示的层更多的层,每个层还可以包括比图10所示的组件更多的组件。
应用层存在各种各样的应用。例如,上述应用场景中的应用A,应用层还存在桌面启动器。桌面启动器(Launcher),用于管理系统桌面,例如,启动或停止系统桌面等。
框架层存在导航组件、活动管理组件(ActivityManagerServer,AMS)和窗口管理组件。
导航组件可以通过多种方式实现,例如,手势导航、悬浮导航和三键导航等,具体可参照后续实施例的描述。
活动管理组件中包括:活动任务管理组件(ActivityTaskManagerService,ATMS)和Activity record。
ATMS用于负责Activity的启动、切换、调度等工作。
Activity record记录了Activity的信息,例如,记录了Activity的状态。
AMS用于管理应用的Activity的生命周期。以生命周期中的部分状态为例进行说明,当应用冷启动后第一次打开一个Activity时,该Activity首先处于on create状态;当应用从前台切换到后台时,该Activity进入on stop状态,该状态下,Activity对应的界面不可见;在该Activity再次被打开时,该Activity首先进入on resume状态;在该Activity被切换掉时可以进入on destroy状态以完成销毁,在on destroy状态,该Activity不可见;若重新开启该Activity时,重新进入on create状态。
窗口管理组件中包括:Snapshot、Snapshotcache和WMS。
Snapshot用于显示Activity的界面,还用于执行保存应用切换到后台前显示的最后界面的快照以及显示该快照。
Snapshotcache用于缓存Snapshot模块得到的应用切换到后台前显示的最后界面的快照。
WMS用于绘制窗口(例如,界面,界面的快照)。
本申请实施例在窗口管理组件中增加SnapshotConcurrent模块(SC模块)。该SC模块用于在应用启动时判断该应用是否满足以下条件(或者均为是),在满足或均为是的情况下,强制执行该应用的快照显示流程。
作为SC模块的一种示例,在应用热启动时,判断该应用是否满足以下条件:
(1)判断当前切换到前台的应用是否为热启动。
(2)该应用被切换到后台前存储的快照对应的Activity在应用当前启动时未被销毁。
(3)该应用在启动过程中是否会create Activity。
在满足上述条件的情况下,首先绘制该应用的快照,在该快照绘制完成了,显示该快照。
在显示该应用的快照时,应用的进程create Activity0,resume Activity1。在该Activity1对应的界面绘制完成后,显示该Activity1对应的界面。
本申请实施例中,在绘制该应用的快照时,应用的进程也可以开始create Activity0。
上述示例中,由于快照为图片格式,相比于Activity1对应的界面,系统不需要复杂的绘制逻辑,电子设备显示快照的响应速度相比于显示界面的响应速度更快。从用户的角度,该应用的启动响应速度较快。当然,该Activity1对应的界面1与快照的内容(界面1生成)一致,所以,在Activity1对应的界面1绘制完成后,电子设备从显示的快照变为显示界面1的过程,用户是感知不到的,提高用户的体验。
需要说明,上述实施例中,电子设备首先显示快照,然而在显示快照之前,也需要对快照进行绘制,所以,在绘制快照的过程中,电子设备会显示一段时间的原界面(例如,应用A的图标所在的系统桌面)。该段时间的长短取决于快照绘制过程的长短。通常快照绘制的过程较短,也可以认为用户点击应用的图标后,电子设备首先显示了快照。
下面将通过图11所示的时序图描述应用启动方法。该方法包括以下步骤:
步骤B1,导航组件检测到返回系统桌面的信息。
电子设备系统中存在导航组件,在用户通过各种手势信息触发电子设备显示系统桌面的情况下,该导航组件可以检测到返回系统桌面的信息。
作为示例,用户通过手势导航(例如,用户手指从电子设备的显示屏底部向上滑动)触发电子设备显示系统桌面;或者,用户通过悬浮导航(例如,用户手指点击电子设备的显示屏上显示的悬浮球按钮)触发电子设备显示系统桌面;或者,用户通过三键导航(例如,用户手指点击三键导航中的返回主界面按钮)触发电子设备显示系统桌面。
图5中的(c)所示的手势可以触发导航组件检测到返回系统桌面的信息。
本申请实施例以用户通过手势导航触发应用A从前台退回到后台后,电子设备显示系统桌面为例。实际应用中,应用A从前台退回到后台后,电子设备可以显示系统桌面以外的其他界面,用户在其他界面进行操作后,再回到系统桌面。
作为示例,用户通过手势触发电子设备显示侧边导航栏,该侧边导航栏为电子设备侧面出现的悬浮界面,该悬浮界面中包括多个应用的图标),用户点击侧边导航栏中的应用B的图标,则电子设备控制应用A从前台切换到后台,电子设备显示应用B的界面。在电子设备显示应用B的界面的情况下,用户通过操作触发电子设备回到系统桌面。
上述示例均以用户在电子设备的触控屏上的手势作为示例触发电子设备切换应用到后台。实际应用中,还可以通过语音指令或隔空手势的方式进行应用从前台到后台的切换。
作为示例,在电子设备显示应用A的界面的情况下,用户发出“回到系统桌面”的语音信息,则电子设备切换应用A到系统后台,电子设备显示系统桌面。
应用继续发出“打开应用B”的语音信息,则电子设备显示应用B的界面;用户再发出“回到系统桌面”的语音信息,则电子设备切换应用A到系统后台,电子设备显示系统桌面。
本申请实施例对应用从前台到后台运行的触发方式不做限定。对该应用到后台运行后,电子设备显示的界面也不做限定。对应用A退回到后台运行后到再次启动应用A的中间时段,用户对电子设备的操作也不做限定。
步骤B2,导航组件检测到返回系统桌面的信息之后,导航组件向ATMS发送信息,该信息用于通知ATMS将返回系统桌面。
ATMS接收到导航组件发送的用于返回系统桌面的信息之后,一方面需要保存电子设备前台运行的应用显示的最后界面的快照(参见步骤B3至步骤B6),一方面需要停止电子设备当前前台运行的应用(参见步骤B7至步骤B8)。
步骤B3,ATMS接收到导航组件发送的用于返回系统桌面的信息之后,向snapshot发送信息,该信息用于指示snapshot保存电子设备当前前台运行的应用的快照。
步骤B4,snapshot接收到ATMS发送的用于表示保存电子设备当前前台运行的应用的快照的信息之后,对电子设备当前前台运行的应用进行截屏,得到电子设备前台运行的应用当前显示的界面的快照。
作为示例,在电子设备当前前台运行的应用为应用A的情况下,则snapshot对应用A当前显示的界面进行截屏得到应用A当前显示的界面的快照。
需要说明,此时得到的快照并不是对电子设备的显示屏当前显示的内容进行截屏得到的图像快照,而是根据电子设备中的应用A当前显示的界面得到的图像快照。该图像快照中可以包括的内容为应用A的界面内容,可以不包括系统界面的内容(例如,状态栏等)。
该步骤中得到的快照可以对应于图5中的(c)所示的应用A中的界面1(不包括状态栏对应的内容)。
步骤B5,snapshot得到应用快照之后,将得到的应用快照缓存在snapshotcache中。
步骤B6,snapshot将得到的应用快照成功缓存在snapshotcache中之后,向ATMS发送应用快照保存成功的消息。
步骤B7,ATMS接收到导航组件发送的用于返回系统桌面的信息之后,向电子设备当前前台运行的应用(应用A)发送停止运行的消息。
步骤B8,电子设备当前前台运行的应用接收到该消息之后停止运行,并在停止运行后,向ATMS发送用于表示该应用当前已经停止运行的消息。
需要说明,为了保证能够得到电子设备当前前台运行的电子设备的快照,可以在步骤B3之后一段时间再执行步骤B7,或者在步骤B6之后再执行步骤B7。本申请实施例对此不做限制。
步骤B9,ATMS在接收到电子设备的前台运行的应用(应用A)发送的已经停止运行的消息和该应用的快照已经保存成功的消息之后,可以存储该应用的进程对象。
该应用的进程对象用于表示该应用的进程的状态,作为示例,该应用的进程对象对应的标识符为第一标识符(例如,1)时,表示该应用的进程存在,该应用的进程对象对应的标识符为第二标识符(例如,0)时,表示该应用的进程不存在(已经销毁)。ATMS在存储该应用的进程对象时,以第一标识符存储,在该应用的进程对象销毁时或应用被退出杀掉时(应用被退出杀掉,该应用的进程自然被销毁),该第一标识符将更新为第二标识符。
第一标识符和第二标识符仅用于示例,实际应用中,第二标识符也可以为空(null)。
步骤B10,ATMS向Activity record发送应用A的Activity1的最新状态,以更新Activity record中存储的应用A的Activity1的状态。
作为示例,如图5中的(c)所示,此时位于应用A的任务栈顶部的Activity为Activity1。ATMS中包括任务栈,ATMS可以从应用A的任务栈中确定应用A的任务栈顶部的Activity为Activity1,然后向Activity record发送Activity1的状态(on Pause状态或on stop状态)。当然,在应用A的Activity1的状态被销毁(destroy)时,Activity record中记录的Activity1的状态将更新为on destroy状态。
在步骤B10之后,Activity record将存储Activity1的状态。
步骤B11,ATMS在向Activity record发送应用A的Activity1的状态之后,向桌面启动器发出用于表示开启系统桌面的消息。该消息可以指示电子设备的显示屏显示系统桌面。
步骤B12,桌面启动器接收到ATMS发送的用于表示开启系统桌面的消息之后,在电子设备的显示屏显示系统桌面,并向ATMS返回系统桌面完成开启的消息。
在该步骤之后,电子设备显示图5中的(d)所示的界面,即电子设备的显示屏显示系统桌面。
当然,用户还可以在系统桌面上点击应用A的图标,以再次启动应用A。由于应用A从前台退回到后台之后的时间较短,这种情况下,应用A通常为热启动。
当然,本申请实施例以应用A从前台退回到后台之后,电子设备显示系统桌面的情况下,再次启动应用A为例进行说明。实际应用中。用户还可以在应用A从前台退回到后台之后,在电子设备的系统桌面上进行其他操作以进入其他界面之后再回到电子设备的系统桌面,然后在系统桌面上点击应用A的图标以启动应用A。
步骤B13,桌面启动器检测到启动应用A的操作。
本申请实施例重点描述应用A的热启动场景,可以是用户在系统桌面上点击应用图标以启动该应用的场景,例如,图5中的(d)。在这种场景下,桌面启动器检测到启动应用A的操作。
当然,实际应用中,也可以是通过其他应用跳转到应用A以热启动应用A的场景,在这种场景下,其他应用也可以检测到启动应用A的操作。或者,用户点击系统桌面上的小控件的方式热启动应用A的场景,在这种场景下,小控件可以检测到启动应用A的操作。
参见图12中的(a),为从其他应用跳转到应用A以启动应用A的场景。该场景下,电子设备显示其他应用(例如,应用B)的界面,该界面中包括应用A的跳转控件,用户点击应用A的跳转控件,应用B检测到启动应用A的操作,电子设备将启动应用A。
参见图12中的(b),为用户点击系统桌面上的小控件的方式启动应用A的场景。在用户点击系统桌面上的小控件时,该小控件可以检测到启动应用A的操作。
步骤B14,桌面启动器检测到启动应用A的操作之后,桌面启动器向ATMS发送用于表示启动应用A的指令,该指令可以携带应用A的唯一标识。该唯一标识可以为应用A的包名。
步骤B15,ATMS接收到桌面启动器发送的用于表示启动应用A的指令之后,得到应用A的启动参数:create Activity0,目标Activity为Activity1,将应用A的启动参数发送给SC模块。该启动参数也可以记为启动信息。
其中,Activity0可以为应用A的开发者为应用A启动时添加的广告Activity,当然,也可能是其他需要在应用A启动时create的Activity。目标Activity为应用A上一次退回到后台前保留在任务栈顶部的Activity。
SC模块在接收到ATMS发送的应用A的启动参数之后,可以判断应用A是否满足上述实施例中的判断逻辑。SC模块在进行判断时,首先根据接收到的应用标识确定当前启动的应用为应用A,然后判断是否满足三个条件(或者是否均为是),三个判断步骤的执行顺序不分先后,本申请并不对三个判断步骤的先后顺序进行限制。当然,若任一判断步骤的执行结果为否,则SC模块可以不再执行后续的判断步骤,而是执行应用A的开发者和系统设置的应用A在启动时的原流程。
本申请实施例中,可以先判断应用A是否存在create其他Activity的行为,然后判断该应用当前是否为热启动,最后判断目标Activity是否未被销毁。具体可参照步骤B16至步骤B22的内容。
步骤B16,SC模块根据接收到的应用A的启动参数确定存在create其他Activity的行为(通过启动参数create Activity0确定)。
步骤B17,SC模块从ATMS获取应用A的进程对象(可以通过应用的唯一标识获取)。
步骤B18,SC模块从ATMS得到应用A的进程对象。
如前所述,应用A的进程对象中的标识符可以确定应用A的进程是否还存在于系统中。若进程对象的标识符为第一标识符,则表示应用A的进程还存在于系统中,可以判断应用A当前为热启动。
步骤B19,SC模块根据得到的应用A的进程对象确定应用A为热启动。
该步骤中,SC模块获取到应用A的进程对象为“1”,结合步骤B9中关于进程对象的描述,SC模块根据得到的应用A的进程对象的内容(1)确定应用A为热启动。
步骤B20,SC模块从Activity record获取目标Activity(Activity1)的状态。
步骤B21,SC模块从Activity record得到目标Activity(Activity1)的状态。
如前所述,Activity record中存储了Activity的状态,若Activity1的状态不为destroy状态,则确定Activity1未被销毁。
步骤B22,SC模块根据得到目标Activity(Activity1)的状态确定Activity1未被销毁。
经过步骤B16至步骤B22可以确定应用A满足上述三个判断步骤对应的条件(或者判断结果均为是)。
步骤B23,在经过步骤B16至步骤B22确定应用A满足上述三个判断步骤对应的条件之后,向ATMS发送执行显示应用A的快照的信息。
当然,在应用A不满足上述三个判断步骤对应的条件的情况下(任一个条件判断为否),应用A的启动过程执行应用A的开发者为应用A设置的原启动逻辑,原启动逻辑可以具体可参照上述实施例中的描述。
步骤B24,ATMS接收到SC模块发送的用于执行显示应用A的快照的信息之后,向ActivityRecord发送用于添加应用A的快照的信息。
步骤B25,ActivityRecord接收到ATMS发送的用于添加应用A的快照的信息之后,向snapshot发送用于添加应用A的快照的信息。
步骤B26,snapshot接收到用于添加应用A的快照的信息之后,从snapshotcache获取应用A的快照。该快照为步骤B5存储的应用A的快照。
步骤B27,snapshot从snapshotcache得到应用A的快照。
本申请实施例中,步骤B24至步骤B26中传递的信息可以携带应用A的标识和Activity1的标识。以通过应用A的标识和Activity1的标识得到应用A的Activity1对应的快照。
步骤B28,snapshot从snapshotcache得到应用A的快照之后,向WMS发送应用A的快照。
步骤B29,snapshot成功向WMS发送快照之后,向ActivityRecord发送用于表示成功添加应用A的快照的消息。
步骤B30,ActivityRecord接收到snapshot发送的用于表示成功添加应用A的快照的消息之后,向ATMS发送用于表示成功添加应用A的快照的消息。
步骤B31,ATMS接收到用于表示成功添加应用A的快照的消息之后,首先向snapshot发送指令,该指令用于指示snapshot执行应用启动效果。
步骤B32,snapshot接收到ATMS发送的用于指示执行应用启动效果的指令之后,向WMS发送绘制快照的指令。
步骤B33,WMS接收到snapshot发送的绘制快照的指令后,根据之前接收到的快照绘制应用A的快照,在绘制成功后显示应用A的快照。
需要说明,本申请实施例中,电子设备执行的快照的缓存、传输过程均存储的快照的相关信息,例如,bitmap。WMS在绘制应用A的快照时,基于之前接收到的快照的相关信息绘制该快照。
当然,绘制显示的过程并不完全是WMS绘制显示,而是WMS通过调用其它模块实现绘制、渲染、显示等工作。
需要说明,绘制应用A的快照也需要时间,所以图7中的(c)显示的在热启动开始时刻之后,电子设备中的窗口在绘制应用A的快照期间维持显示应用A所在的原界面(系统桌面)。在绘制得到应用A的快照(snapshot1)之后,电子设备的窗口显示应用A的快照(snapshot1)。
参见图7中的(a),为电子设备显示的应用A的快照。通过图7中的(a)所示的界面中右上角显示的时间(8:01)和图5中的(c)所示的界面中右上角显示的时间(8:00)可以理解,在应用从前台退回到后台时,保存的该应用的快照不包括任务栏(即不是电子设备显示屏的截图),保存的快照为应用A的界面内容对应的快照。
步骤B34,ATMS执行完步骤B30之后,还需要向桌面启动器发送停止系统桌面的信息,以使得电子设备停止运行系统桌面。
步骤B35,在桌面启动器停止运行之后,向ATMS发送表示系统桌面已经停止运行的消息。
在本申请实施例中,在步骤B29之后执行步骤B30,而不是在步骤B33之后执行步骤B30。这是由于,在系统繁忙或负载较大的情况下,步骤B30和步骤B31的执行时间很可能会向后延迟。假如延迟到了步骤B37之后,则系统判定已经得到Activity1,则不再执行绘制快照并显示快照的步骤。所以,本申请实施例中将步骤B30设置在步骤B32之前。
步骤B36,ATMS接收到桌面启动器发送的表示系统主界面已经停止的消息之后,向应用A发送启动消息。
后续步骤的流程将按照应用A设置的和系统规定的启动应用的流程将应用A进行启动。具体可参照步骤B35至步骤B43。需要说明,步骤B35至步骤B43也只是一种示例,在具体实现时,还可以是其他形式的启动应用的流程,本申请实施例在此不再举例。
步骤B37,应用A接收到启动消息后,通过应用A的进程create Activity0。
步骤B38,在应用A的进程create Activity0之后,通过应用A的进程resume Activity1。
步骤B39,在应用A的进程resume Activity1之后,向ATMS发送用于表示添加Activity1的界面的消息,该消息可以携带Activity1对应的界面1的显示参数。
步骤B40,ATMS接收到应用A发送的用于表示添加Activity1的界面的消息之后,向WMS发送用于表示添加Activity1对应的界面的消息。该消息也可以携带Activity1对应的界面1的显示参数。
步骤B41,WMS接收到Activity1对应的界面的显示参数之后向ATMS返回添加成功的消息。
在具体实现时,WMS接收到的Activity1对应的界面1的显示参数后,表示添加Activity1的界面成功,向ATMS返回添加成功的消息。
步骤B42,ATMS接收到snapshot发送的Activity1的界面添加成功的消息后,向应用A返回Activity1的界面添加成功的消息。
步骤B43,应用A接收到Activity1的界面添加成功的消息后,向ATMS发送表示Activity1resume完成的消息。
步骤B44,ATMS接收到应用A发送的Activity1resume完成的消息后,向WMS发送指令,该指令用于指示WMS执行启动效果。
步骤B45,WMS接收到ATMS发送该指令后,基于之前得到的Activity1的界面的显示参数绘制并显示Activity1对应的界面1。
在该步骤之后,电子设备将显示图7中的(b)所示的界面1。由于电子设备可以预先显示snapshot1,在显示snapshot1期间可以create Activity0,resume Activity1,直到得到Activity1对应的界面1。该界面1和snapshot1内容相同,从用户的角度,认为应用A的启动响应速度较快,从而提高了用户体验。
本申请实施例以Activity0为广告Activity为例进行说明,实际应用中,在判断是否存在create Activity的条件时,存在create任一个或多个Activity的行为均适用于本申请实施例。即create Activity0中的Activity0不一定限定于广告Activity,还可以是其他Activity,例如,空白Activity(不存在界面的Activity),白页Activity(显示白色界面的Activity)等。
本申请实施例中,虽然应用的开发者设置了应用在热启动时执行快照流程。然而,由于电子设备的系统为避免存在create Activity行为时,快照对应界面内容和应用启动后最终显示的内容不一致导致用户体验较差的问题,设置了在应用的热启动时,若存在create Activity的行为,则快照流程失效的机制,即图5和图6所示实施例。快照流程失效后,用户的角度,应用的响应速度较慢,同样导致用户的体验较差。本申请实施例可以解决应用的设置和系统的设置的冲突导致用户的角度认为应用启动响应速率较慢的问题。在确定应用启动时满足本申请实施例提供的3个逻辑判断条件(或均为是)的情况下,强制执行快照流程,从而从用户的角度,提高了应用的启动响应速度,提高了用户的体验。
作为另一实施例,图13为本申请实施例提供的流程示意图。
步骤1301,电子设备显示第一应用的第一界面。
第一应用为电子设备中安装的任意应用软件。第一界面为第一应用在前台运行过程中显示的任一界面。
步骤1302,电子设备接收用户输入的第一操作。
步骤1303,响应于第一操作,电子设备将第一应用切换到后台运行。
第一操作为任意将应用切换到后台的操作,例如,回到系统桌面(系统主界面)的操作;调出多任务卡片并多任务卡片中点击除所述第一应用以外的其他应用的任务卡片的操作,电子设备的侧边导航栏中除所述第一应用以外的其他应用的图标的点击操作,电子设备顶部的第一应用以外的其他应用的通知消息的点击操作,其他操作将不再一一举例。
步骤1304,电子设备接收用户输入的第二操作。
第二操作可以是上述步骤B13中的操作和图12所示的操作中的任意操作。
步骤1305,响应于第二操作,电子设备启动第一应用。
步骤1306,在启动第一应用的过程中,在第一应用满足预设条件的情况下,电子设备显示第一图像,其中,第一图像与第一界面相关,预设条件包括:第一应用的进程未结束、第一界面对应的第一活动未销毁、第一应用在启动时需要创建第二活动;
进程未结束表示进程还存在于系统中,第一界面对应的第一活动未销毁表示第一活动未处于destroy状态,第二活动可以是第一活动以外的任意活动。例如,如前所述的广告Activity,也可以是空白Activity(显示全白界面的Activity),还可以是应用的logo Activity。
步骤1307,电子设备恢复第一活动后,电子设备显示第一界面。
第一活动为目标Activity,第一界面为目标Activity对应的界面。第一界面还为电子设备退回到后台前显示的最后界面。
另外,在步骤1303之前,用户还可以在电子设备上进行其他操作,以打开其他应用,再回到系统桌面。
作为示例,电子设备接收用户输入的第三操作;响应于第三操作,所述电子设备启动第二应用并显示第二应用的第二界面。
第三操作为任意启动第二应用的操作,例如,点击系统桌面上第二应用的图标。
当然,也可以是调出多任务卡片并从多任务卡片点击第二应用的任务卡片的操作,从侧边导航栏点击第二应用的图标的操作等。第二应用的第二界面可以是第二应用的主界面,也可以是第二应用上次退到后台运行前显示的界面。
应理解,上述实施例中各步骤的序号的大小并不意味着执行顺序的先后,各过程的执行顺序应以其功能和内在逻辑确定,而不应对本申请实施例的实施过程构成任何限定。
本申请实施例还提供了一种计算机可读存储介质,计算机可读存储介质存储有计算机程序,计算机程序被处理器执行时可实现上述各个方法实施例中的步骤。
本申请实施例还提供了一种计算机程序产品,当计算机程序产品在第一设备上运行时,使得第一设备可实现上述各个方法实施例中的步骤。
集成的单元如果以软件功能单元的形式实现并作为独立的产品销售或使用时,可以存储在一个计算机可读取存储介质中。基于这样的理解,本申请实现上述实施例方法中的全 部或部分流程,可以通过计算机程序来指令相关的硬件来完成,的计算机程序可存储于一计算机可读存储介质中,该计算机程序在被处理器执行时,可实现上述各个方法实施例的步骤。其中,计算机程序包括计算机程序代码,计算机程序代码可以为源代码形式、对象代码形式、可执行文件或某些中间形式等。计算机可读介质至少可以包括:能够将计算机程序代码携带到第一设备的任何实体或装置、记录介质、计算机存储器、只读存储器(ROM,Read-Only Memory)、随机存取存储器(RAM,Random Access Memory)、电载波信号、电信信号以及软件分发介质。例如U盘、移动硬盘、磁碟或者光盘等。在某些司法管辖区,根据立法和专利实践,计算机可读介质不可以是电载波信号和电信信号。
本申请实施例还提供了一种芯片系统,芯片系统包括处理器,处理器与存储器耦合,处理器执行存储器中存储的计算机程序,以实现本申请任一方法实施例的步骤。芯片系统可以为单个芯片,或者多个芯片组成的芯片模组。
在上述实施例中,对各个实施例的描述都各有侧重,某个实施例中没有详述或记载的部分,可以参见其它实施例的相关描述。
本领域普通技术人员可以意识到,结合本文中所公开的实施例描述的各示例的单元及方法步骤,能够以电子硬件、或者计算机软件和电子硬件的结合来实现。这些功能究竟以硬件还是软件方式来执行,取决于技术方案的特定应用和设计约束条件。专业技术人员可以对每个特定的应用来使用不同方法来实现所描述的功能,但是这种实现不应认为超出本申请的范围。
以上实施例仅用以说明本申请的技术方案,而非对其限制;尽管参照前述实施例对本申请进行了详细的说明,本领域的普通技术人员应当理解:其依然可以对前述各实施例所记载的技术方案进行修改,或者对其中部分技术特征进行等同替换;而这些修改或者替换,并不使相应技术方案的本质脱离本申请各实施例技术方案的精神和范围,均应包含在本申请的保护范围之内。

Claims (22)

  1. 一种应用启动方法,其特征在于,应用于电子设备,所述方法包括:
    所述电子设备显示第一应用的第一界面;
    所述电子设备接收用户输入的第一操作;
    响应于所述第一操作,所述电子设备将所述第一应用切换到后台运行;
    所述电子设备接收用户输入的第二操作;
    响应于所述第二操作,所述电子设备启动所述第一应用;
    在启动所述第一应用的过程中,在所述第一应用满足预设条件的情况下,所述电子设备显示第一图像,其中,所述第一图像与所述第一界面相关,所述预设条件包括:所述第一应用的进程未结束、所述第一界面对应的第一活动未销毁和所述第一应用在启动时需要创建第二活动;
    所述电子设备恢复所述第一活动后,所述电子设备显示所述第一界面。
  2. 如权利要求1所述的方法,其特征在于,所述电子设备接收用户输入的第一操作后,所述方法还包括:
    所述电子设备基于所述第一界面得到第二图像;
    所述电子设备缓存所述第二图像,所述第二图像包含所述第一图像。
  3. 如权利要求1或2所述的方法,其特征在于,所述电子设备显示第一图像之前,所述方法还包括:
    所述电子设备确定所述第一应用的进程未结束;
    所述电子设备确定所述第一界面对应的所述第一活动未销毁;
    所述电子设备确定所述第一应用在启动时需要创建所述第二活动。
  4. 如权利要求3所述的方法,其特征在于,所述电子设备包括逻辑判断组件和活动任务管理组件,所述活动任务管理组件用于记录应用的进程的状态;
    所述电子设备确定所述第一应用的进程未结束包括:
    所述逻辑判断组件从所述活动任务管理组件获取所述第一应用的进程的状态;
    所述逻辑判断组件根据所述第一应用的进程的状态确定所述第一应用的进程未结束。
  5. 如权利要求3或4所述的方法,其特征在于,所述电子设备包括逻辑判断组件和活动记录组件,所述活动记录组件用于记录活动的状态;
    所述电子设备确定所述第一界面对应的所述第一活动未销毁包括:
    所述逻辑判断组件从所述活动记录组件获取所述第一活动的状态;
    所述逻辑判断组件根据所述第一活动的状态确定所述第一活动未销毁。
  6. 如权利要求5所述的方法,其特征在于,所述电子设备包括活动任务管理组件,所述活动任务管理组件用于在所述第一应用启动时向所述逻辑判断组件发送所述第一应用的启动信息,所述第一应用的启动信息包括所述第一应用启动时的目标活动;
    所述逻辑判断组件从所述活动记录组件获取所述第一活动的状态之前,所述方法还包括:
    所述逻辑判断组件接收所述活动任务管理组件发送的所述第一应用的启动信息;
    所述逻辑判断组件根据所述第一应用的启动信息确定所述第一应用启动时的目标 活动为所述第一活动。
  7. 如权利要求3至6任一项所述的方法,其特征在于,所述电子设备包括逻辑判断组件和活动任务管理组件,所述活动任务管理组件用于在所述第一应用启动时向所述逻辑判断组件发送所述第一应用的启动信息,所述第一应用的启动信息包括创建所述第二活动;
    所述电子设备确定所述第一应用在启动时需要创建所述第二活动之前,所述方法还包括:
    所述逻辑判断组件接收所述活动任务管理组件发送的所述第一应用的启动信息;
    所述电子设备确定所述第一应用在启动时需要创建所述第二活动,包括:
    所述逻辑判断组件根据所述第一应用的启动信息确定所述第一应用在启动时需要创建所述第二活动。
  8. 如权利要求6或7所述的方法,其特征在于,所述电子设备还包括桌面启动器;
    所述电子设备接收用户输入的第二操作,具体为:
    所述桌面启动器接收用户输入的所述第二操作;
    所述方法还包括:
    响应于所述第二操作,所述桌面启动器向所述活动任务管理组件发送所述第一应用的启动指令;
    响应于接收所述启动指令,所述活动任务管理组件获取所述第一应用的启动信息;
    所述活动任务管理组件向所述逻辑判断组件发送所述第一应用的启动信息。
  9. 如权利要求2所述的方法,其特征在于,所述电子设备包括:活动任务管理组件、逻辑判断组件、快照模块和WMS;
    所述电子设备缓存所述第二图像,包括:
    所述快照模块缓存第二图像;
    所述在所述第一应用满足预设条件的情况下,所述电子设备显示第一图像,包括:
    所述逻辑判断组件判断所述第一应用满足所述预设条件的情况下,所述逻辑判断组件向所述活动任务管理组件发送第一信息,所述第一信息用于表示所述第一应用满足所述预设条件;
    所述活动任务管理组件接收到所述第一信息的情况下,向所述快照模块发送第二信息,所述第二信息用于指示所述快照模块向所述WMS发送所述第二图像;
    所述快照模块向所述WMS发送所述第二图像;
    所述WMS基于所述第二图像,控制所述电子设备显示所述第一图像。
  10. 如权利要求9所述的方法,其特征在于,所述电子设备包括:活动记录组件;
    所述活动任务管理组件向所述快照模块发送第二信息包括:
    所述活动任务管理组件通过所述活动记录组件向所述快照模块发送所述第二信息。
  11. 如权利要求9或10所述的方法,其特征在于,所述第一图像与所述第二图像相同,所述第一图像与所述第一界面的图像相同;
    或者,所述第一图像与所述第一界面的图像相同,所述第二图像包括所述第一界面的图像和第一状态栏内容,所述第一状态栏内容为所述电子设备缓存所述第二图像时所述电子设备的状态栏内容。
  12. 如权利要求9至11任一项所述的方法,其特征在于,在所述快照模块向所述WMS发送所述第二图像之后,所述方法还包括:
    所述快照模块向所述活动任务管理组件发送所述第二图像添加成功的信息;
    响应于接收到所述第二图像添加成功的信息,所述活动任务管理组件通过所述快照模块向所述WMS发送第一指令;所述第一指令用于指示所述WMS基于所述第二图像,控制所述电子设备显示所述第一图像。
  13. 如权利要求12所述的方法,其特征在于,所述电子设备包括所述活动记录组件;
    所述快照模块向所述活动任务管理组件发送所述第二图像添加成功的信息包括:
    所述快照模块通过所述活动记录组件向所述活动任务管理组件发送所述第二图像添加成功的信息。
  14. 如权利要求12或13所述的方法,其特征在于,所述第二操作为作用在所述电子设备的系统桌面上显示的所述第一应用的图标的操作,所述电子设备还包括:桌面启动器;
    所述活动任务管理组件通过所述快照模块向所述WMS发送第一指令之后,所述方法还包括:
    所述活动任务管理组件向所述桌面启动器发送第三信息,所述第三信息用于指示所述桌面启动器停止显示所述系统桌面。
  15. 如权利要求9至14任一项所述的方法,其特征在于,所述快照模块缓存第二图像包括:
    所述快照模块将所述第二图像缓存在快照缓存文件中;
    相应的,所述快照模块向所述WMS发送所述第二图像包括:
    所述快照模块从所述快照缓存文件获取所述第二图像;
    所述快照模块向所述WMS发送所述第二图像。
  16. 如权利要求1至15任一项所述的方法,其特征在于,所述电子设备接收用户输入的第二操作之前,所述方法还包括:
    所述电子设备接收用户输入的第三操作;
    响应于所述第三操作,所述电子设备启动第二应用并显示所述第二应用的第二界面。
  17. 如权利要求1至16任一项所述的方法,其特征在于,所述电子设备恢复所述第一活动之前,所述方法还包括:
    所述电子设备创建所述第二活动。
  18. 如权利要求1至17任一项所述的方法,其特征在于,所述第一操作包括:在所述电子设备的触控屏上的手势操作;或,在所述电子设备的摄像头视野内的隔空手势操作。
  19. 一种应用启动方法,其特征在于,应用于电子设备,所述方法包括:
    所述电子设备显示第一应用的第一界面;
    所述电子设备接收用户输入的第一操作;
    响应于所述第一操作,所述电子设备将所述第一应用切换到后台运行;
    所述电子设备接收用户输入的第二操作;
    响应于所述第二操作,所述电子设备启动所述第一应用;
    在启动所述第一应用的过程中,在所述第一应用满足预设条件的情况下,所述电子设备显示第一图像,其中,所述第一图像与所述第一界面相关,所述预设条件包括:所述第一应用的进程未结束、所述第一界面对应的第一活动未销毁和所述第一应用在启动时需要创建第二活动;
    所述电子设备创建所述第二活动;
    所述电子设备恢复所述第一活动后,所述电子设备显示所述第一界面。
  20. 一种电子设备,其特征在于,所述电子设备包括处理器,所述处理器用于运行存储器中存储的计算机程序,以使得所述电子设备实现如权利要求1至19任一项所述的方法。
  21. 一种计算机可读存储介质,其特征在于,所述计算机可读存储介质中存储计算机程序,所述计算机程序在处理器上运行时实现如权利要求1至19任一项所述的方法。
  22. 一种计算机程序产品,其特征在于,所述计算机程序产品在电子设备上运行时,使得所述电子设备实现如权利要求1至19任一项所述的方法。
PCT/CN2022/117370 2021-11-30 2022-09-06 应用启动方法、电子设备及可读存储介质 Ceased WO2023098202A1 (zh)

Priority Applications (3)

Application Number Priority Date Filing Date Title
CN202280090581.5A CN118661150B (zh) 2021-11-30 2022-09-06 应用启动方法、电子设备及可读存储介质
EP22879629.8A EP4220366B1 (en) 2021-11-30 2022-09-06 Application starting method, electronic device, and readable storage medium
US18/034,560 US12197924B2 (en) 2021-11-30 2022-09-06 Application starting method, electronic device, and readable storage medium

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN202111449783.8 2021-11-30
CN202111449783.8A CN114327179B (zh) 2021-11-30 2021-11-30 应用启动方法、电子设备及可读存储介质

Publications (1)

Publication Number Publication Date
WO2023098202A1 true WO2023098202A1 (zh) 2023-06-08

Family

ID=81049586

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2022/117370 Ceased WO2023098202A1 (zh) 2021-11-30 2022-09-06 应用启动方法、电子设备及可读存储介质

Country Status (4)

Country Link
US (1) US12197924B2 (zh)
EP (1) EP4220366B1 (zh)
CN (3) CN114327179B (zh)
WO (1) WO2023098202A1 (zh)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN117724634A (zh) * 2023-07-31 2024-03-19 荣耀终端有限公司 一种应用程序的进程管理方法和装置

Families Citing this family (13)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114327179B (zh) 2021-11-30 2022-12-16 荣耀终端有限公司 应用启动方法、电子设备及可读存储介质
CN116954743A (zh) * 2022-04-15 2023-10-27 华为技术有限公司 一种应用启动方法及装置
CN114741136B (zh) * 2022-05-05 2025-07-22 联想(北京)有限公司 处理方法和电子设备
CN117667326B (zh) * 2022-08-26 2026-07-28 北京字跳网络技术有限公司 控件处理方法、装置、设备及存储介质
CN116719569B (zh) * 2022-09-02 2024-05-24 荣耀终端有限公司 启动应用的方法及装置
CN115659084A (zh) * 2022-11-07 2023-01-31 南京维沃软件技术有限公司 显示控制方法、装置及电子设备
CN118113189A (zh) * 2022-11-30 2024-05-31 华为技术有限公司 显示方法、显示装置和可穿戴设备
CN117289837B (zh) * 2023-09-15 2024-09-03 荣耀终端有限公司 一种界面切换方法及电子设备
CN118444995B (zh) * 2023-12-29 2025-04-15 荣耀终端股份有限公司 应用启动方法和电子设备
CN120276782A (zh) * 2023-12-29 2025-07-08 荣耀终端股份有限公司 应用启动方法和电子设备
WO2025217820A1 (zh) * 2024-04-16 2025-10-23 荣耀终端股份有限公司 一种界面切换的方法及电子设备
CN118245161A (zh) * 2024-05-24 2024-06-25 荣耀终端有限公司 应用启动方法及相关装置
CN119829185A (zh) * 2024-12-24 2025-04-15 浙江吉利控股集团有限公司 交互控制方法及计算机可读存储介质、车辆

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1977246A (zh) * 2004-05-26 2007-06-06 高通股份有限公司 用于在重启应用程序时使用应用程序状态历史信息的方法、软件和装置
US20120311490A1 (en) * 2011-06-03 2012-12-06 Apple Inc. Methods for launching applications with efficient user impression
CN109947317A (zh) * 2019-03-11 2019-06-28 北京字节跳动网络技术有限公司 应用程序页面显示方法和装置
CN113268286A (zh) * 2021-06-09 2021-08-17 深圳市火乐科技发展有限公司 一种应用启动方法、装置、投影设备及存储介质
CN114327179A (zh) * 2021-11-30 2022-04-12 荣耀终端有限公司 应用启动方法、电子设备及可读存储介质

Family Cites Families (21)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR101356368B1 (ko) * 2012-02-24 2014-01-29 주식회사 팬택 어플리케이션 전환 장치 및 방법
IN2014DN09227A (zh) * 2012-05-06 2015-07-10 Citrix Online Llc
CN103593254A (zh) * 2012-08-13 2014-02-19 三亚中兴软件有限责任公司 应用快照服务系统及其应用快照的生成方法
CN103019841B (zh) * 2012-11-23 2016-06-29 广东欧珀移动通信有限公司 快速切换应用程序的方法及其终端
US9430333B2 (en) 2013-03-14 2016-08-30 Microsoft Technology Licensing, Llc Recovery of application from snapshot
TW201520886A (zh) * 2013-11-28 2015-06-01 Acer Inc 可攜式電子裝置及其介面顯示方法
CN106502527A (zh) * 2016-09-29 2017-03-15 北京小米移动软件有限公司 一种内容分享的方法、装置及终端
US11036387B2 (en) * 2017-05-16 2021-06-15 Apple Inc. Devices, methods, and graphical user interfaces for navigating between user interfaces and interacting with control objects
CN107832113A (zh) * 2017-10-26 2018-03-23 青岛海信移动通信技术股份有限公司 一种Android系统应用程序的界面显示方法及装置
CN107748686B (zh) * 2017-11-30 2021-03-12 Oppo广东移动通信有限公司 应用程序的启动优化方法、装置、存储介质及智能终端
DK180316B1 (en) * 2018-06-03 2020-11-06 Apple Inc Devices and methods for interacting with an application switching user interface
CN109005462A (zh) * 2018-08-17 2018-12-14 青岛海信电器股份有限公司 基于应用自带广告播放的控制方法、装置及终端
US10649630B1 (en) * 2019-01-08 2020-05-12 Servicenow, Inc. Graphical user interfaces for software asset management
CN111435299B (zh) * 2019-01-14 2023-06-20 阿里巴巴集团控股有限公司 一种应用程序的处理方法及装置
CN110007981B (zh) * 2019-02-28 2021-12-24 Oppo广东移动通信有限公司 启动应用程序的方法、装置、电子设备及介质
CN110096329B (zh) * 2019-05-09 2022-04-01 Oppo广东移动通信有限公司 一种显示内容控制方法、电子装置及计算机可读存储介质
CN110569080B (zh) * 2019-07-30 2021-02-23 华为技术有限公司 一种应用的控制方法与电子设备
US11848099B1 (en) * 2020-01-15 2023-12-19 Navvis & Company, LLC Unified ecosystem experience for managing multiple healthcare applications from a common interface with context passing between applications
US10911540B1 (en) * 2020-03-10 2021-02-02 EMC IP Holding Company LLC Recovering snapshots from a cloud snapshot lineage on cloud storage to a storage system
CN111459381B (zh) * 2020-03-30 2021-06-22 维沃移动通信有限公司 信息展示方法、电子设备及存储介质
CN112114808B (zh) 2020-09-29 2024-07-05 深圳市欢太科技有限公司 页面渲染方法、装置、电子设备

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1977246A (zh) * 2004-05-26 2007-06-06 高通股份有限公司 用于在重启应用程序时使用应用程序状态历史信息的方法、软件和装置
US20120311490A1 (en) * 2011-06-03 2012-12-06 Apple Inc. Methods for launching applications with efficient user impression
CN109947317A (zh) * 2019-03-11 2019-06-28 北京字节跳动网络技术有限公司 应用程序页面显示方法和装置
CN113268286A (zh) * 2021-06-09 2021-08-17 深圳市火乐科技发展有限公司 一种应用启动方法、装置、投影设备及存储介质
CN114327179A (zh) * 2021-11-30 2022-04-12 荣耀终端有限公司 应用启动方法、电子设备及可读存储介质

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
See also references of EP4220366A4

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN117724634A (zh) * 2023-07-31 2024-03-19 荣耀终端有限公司 一种应用程序的进程管理方法和装置

Also Published As

Publication number Publication date
CN114327179A (zh) 2022-04-12
CN116126201B (zh) 2023-11-07
EP4220366A4 (en) 2024-04-24
EP4220366A1 (en) 2023-08-02
EP4220366B1 (en) 2025-10-22
CN116126201A (zh) 2023-05-16
US20240330012A1 (en) 2024-10-03
CN114327179B (zh) 2022-12-16
CN118661150A (zh) 2024-09-17
US12197924B2 (en) 2025-01-14
CN118661150B (zh) 2026-04-17

Similar Documents

Publication Publication Date Title
CN114327179B (zh) 应用启动方法、电子设备及可读存储介质
EP3952263B1 (en) Notification message preview method and electronic device
JP7480931B2 (ja) アプリケーションアイコンを表示する方法および電子デバイス
EP4701171A2 (en) Multi-screen collaboration method and system, and electronic device
WO2023279820A1 (zh) 一种触摸屏采样率的调整方法及电子设备
JP2023503281A (ja) エネルギー効率の良い表示処理方法およびデバイス
WO2023130991A1 (zh) 协同通话方法、装置、设备、存储介质和程序产品
CN117827300A (zh) 显示方法、图形界面及相关装置
CN118113190A (zh) 应用启动时的窗口显示方法、电子设备和可读存储介质
CN115543470B (zh) 应用启动方法、电子设备及可读存储介质
WO2024037542A1 (zh) 一种触控输入的方法、系统、电子设备及存储介质
CN116048679A (zh) 一种图层的处理方法、电子设备及可读存储介质
WO2026051692A1 (zh) 处理配置变化的方法、设备及存储介质
CN113391743A (zh) 一种显示方法及电子设备
CN115390737A (zh) 一种电子设备控制方法及电子设备
CN114816143A (zh) 一种应用切换方法、电子设备及存储介质
CN116700601B (zh) 内存优化方法、设备及存储介质
WO2024104094A1 (zh) 截图分享方法及电子设备
WO2023246604A1 (zh) 手写输入方法及终端
HK40070793B (zh) 应用启动方法、电子设备及可读存储介质
HK40070793A (zh) 应用启动方法、电子设备及可读存储介质
CN115904686A (zh) 内存管理方法、电子设备、计算机存储介质和程序产品
CN118426888B (zh) 一种显示控制方法及电子设备
CN118519568B (zh) 显示控制方法、电子设备、计算机程序产品及存储介质
CN117724640B (zh) 分屏显示方法、电子设备及存储介质

Legal Events

Date Code Title Description
WWE Wipo information: entry into national phase

Ref document number: 18034560

Country of ref document: US

ENP Entry into the national phase

Ref document number: 2022879629

Country of ref document: EP

Effective date: 20230427

NENP Non-entry into the national phase

Ref country code: DE

WWE Wipo information: entry into national phase

Ref document number: 202280090581.5

Country of ref document: CN

WWG Wipo information: grant in national office

Ref document number: 2022879629

Country of ref document: EP