CN117687707A - Application hot start method and electronic equipment - Google Patents

Application hot start method and electronic equipment Download PDF

Info

Publication number
CN117687707A
CN117687707A CN202211073836.5A CN202211073836A CN117687707A CN 117687707 A CN117687707 A CN 117687707A CN 202211073836 A CN202211073836 A CN 202211073836A CN 117687707 A CN117687707 A CN 117687707A
Authority
CN
China
Prior art keywords
interface
application
electronic device
transparent
electronic equipment
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.)
Pending
Application number
CN202211073836.5A
Other languages
Chinese (zh)
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.)
Huawei Technologies Co Ltd
Original Assignee
Huawei Technologies 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 Huawei Technologies Co Ltd filed Critical Huawei Technologies Co Ltd
Priority to CN202211073836.5A priority Critical patent/CN117687707A/en
Priority to PCT/CN2023/115081 priority patent/WO2024046237A1/en
Publication of CN117687707A publication Critical patent/CN117687707A/en
Pending legal-status Critical Current

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements 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/44Arrangements for executing specific programs
    • G06F9/445Program loading or initiating
    • G06F9/44568Immediately runnable code
    • G06F9/44578Preparing or optimising for loading
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements 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/44Arrangements for executing specific programs
    • G06F9/445Program loading or initiating
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements 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/44Arrangements for executing specific programs
    • G06F9/451Execution arrangements for user interfaces

Landscapes

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

Abstract

The application hot start method and the electronic equipment are applied to the technical field of terminals. In the method, when the transparent interface exists in the hot start process of the application, the creation of the transparent interface is skipped, and the target interface is directly created, so that the hot start time of the application can be shortened, and the hot start efficiency of the application is improved.

Description

Application hot start method and electronic equipment
Technical Field
The application relates to the technical field of terminals, in particular to an application hot start method and electronic equipment.
Background
When the application is opened, if the user performs an operation, such as pressing a return key or a Home key, so that the application runs in the background, and then when the user opens the application again, the start of the application is a hot start.
Currently, when a part of applications on an electronic device is started up, a transparent Activity (Activity) is created first, then after the transparent Activity is destroyed, an Activity with a real interface is created, and the Activity is displayed according to the Activity. Thus, some applications create two activities at warm start, resulting in slower warm start of the application.
Disclosure of Invention
The application provides an application hot start method and electronic equipment, which are used for solving the problem of slow application hot start.
In a first aspect, the present application provides an application hot start method, which is applicable to an electronic device. Specifically, the method comprises the following steps: the electronic device detects a first operation to launch a first application, the first application being a background application. And then responding to the first operation, and directly starting the target activity of the first application when the first interface is determined to be a transparent interface. Finally, the electronic device may draw a second interface corresponding to the target activity, launching the first application.
Wherein the first operation includes any one of the following operations: clicking operation on an application icon of the first application; clicking operation on the window of the first application in the multitasking window; voice-triggered operation.
Through the technical scheme, when the application detects that the transparent interface exists in the hot start process, the interface corresponding to the target can be directly drawn, so that the hot start time of the application can be shortened, and the hot start efficiency of the application is improved.
In one possible implementation, determining that the first interface is a transparent interface includes: and the electronic equipment acquires the interface transparency parameter of the first interface, and then determines that the first interface is a transparent interface according to the interface transparency parameter.
Through the technical scheme, the electronic equipment can judge whether the interface is a transparent interface based on the interface transparency parameter, and further directly draw the target interface when the interface is determined to be the transparent interface, so that the time for hot start of application is shortened.
In one possible implementation, the determining, by the electronic device, that the first interface is a transparent interface according to the interface transparency parameter includes:
and when the electronic equipment determines that the interface transparency parameter is smaller than or equal to the transparency threshold, determining that the first interface is a transparent interface.
Through the technical scheme, the interface transparency parameter of the first interface can be compared with the transparency threshold value, so that whether the first interface is a transparent interface or not is judged.
In one possible implementation, the electronic device obtains an interface transparency parameter of the first interface, including: the electronic device determines a transparency parameter of the first interface according to the setAlpha () function.
In one possible implementation, before launching the target activity of the first application, the method further comprises: the electronic device skips creation of the first interface.
Through the technical scheme, when the application detects the transparent interface in the hot start process, the creation of the transparent interface can be skipped, and the target activity can be directly started, so that the creation time of the transparent interface can be reduced, the hot start time of the application can be shortened, and the hot start efficiency of the application can be improved.
In one possible implementation, before the electronic device detects the first operation, the method further includes:
the electronic equipment displays a second interface of the first application, wherein the second interface is an interface displayed by the first application before switching to background operation. And then, when the electronic equipment detects a second operation for switching the first application to the background, responding to the second operation and switching the first application from the foreground to the background.
Wherein the second operation includes any one of the following operations: an operation of switching from the first application to a second application; and returning to the operation of the main interface.
Through the technical scheme, the first application can be switched from the foreground operation to the background operation, so that the hot start flow of the first application can be started only when the first operation is detected.
In a second aspect, the present application provides an electronic device comprising a display screen; one or more processors; one or more memories; one or more sensors; a plurality of applications; and one or more computer programs; wherein the one or more computer programs are stored in the one or more memories, the one or more computer programs comprising instructions which, when executed by the one or more processors, cause the electronic device to perform the method of any of the above-described first aspects and any of the possible designs of the first aspect.
In a third aspect, the present application also provides an electronic device comprising modules/units performing the method of the first aspect or any one of the possible designs of the first aspect; these modules/units may be implemented by hardware, or may be implemented by hardware executing corresponding software.
In a fourth aspect, the present application further provides a computer readable storage medium having instructions stored therein which, when executed on an electronic device, cause the electronic device to perform the application hot start method of the first aspect and any possible designs of the first aspect thereof.
In a fifth aspect, the present application also provides a computer program product, which when run on an electronic device, causes the electronic device to perform the application hot start method of the first aspect of the embodiments of the present application and any one of the possible designs of the first aspect thereof.
The technical effects of each of the second to fifth aspects and the technical effects that may be achieved by each of the aspects are referred to the technical effects that may be achieved by each of the possible aspects of the first aspect, and the detailed description is not repeated here.
Drawings
Fig. 1 is a schematic structural diagram of an electronic device according to an embodiment of the present application;
FIG. 2 is a block diagram of a software architecture according to an embodiment of the present application;
fig. 3 is a flowchart of an application hot start method provided in an embodiment of the present application;
FIG. 4 is a flowchart of another method for hot start of an application according to an embodiment of the present application;
fig. 5 is a schematic structural diagram of another electronic device according to an embodiment of the present application.
Detailed Description
The technical solutions in the embodiments of the present application will be described in detail below with reference to the drawings in the following embodiments of the present application.
For ease of understanding, related terms and related concepts related to the embodiments of the present application are described below.
1. Application (APP): an application for short, is a software program that is capable of performing some function or functions. Typically, a plurality of applications may be installed in an electronic device. Such as camera applications, text messaging applications, mailbox applications, video applications, music applications, etc. The application mentioned below may be an application installed when the electronic device leaves the factory, or may be an application downloaded from a network or acquired by a user from other electronic devices during use of the electronic device.
2. Application hot start: when an application has been opened, the application will typically be running in the foreground. And after the user returns to the desktop or switches to other programs by pressing a return key, a Home key, sliding up, etc., the application switches to a background application. When the user reopens the application, the background has already a process of the application, at which point the application can be launched from the already existing process. The application is switched from the background application to the foreground application, and the starting mode is called hot start.
3. Foreground application, background application: depending on whether the application can interact directly with the user, the application can be divided into the following categories: foreground application and background application. The foreground application is an application program which is placed in the foreground by a user and can be interacted directly, and the background application is an application program which is placed in the background by the user and can not be interacted directly. In the embodiment of the application, it may be determined that the application is a foreground application or a background application according to whether the application program is directly visible.
The foreground application is when the application is visible and the background application is when the application is not visible. For example, when an interface of an application is displayed on a screen of an electronic device, the application is a foreground application; when an interface of an application is not displayed on a screen of the electronic device, the application is a background application. The interface of the application does not comprise a top status bar and a notification bar of the operating system. As described in the above application warm start, one application program may be converted between a foreground application and a background application in response to an operation by a user.
4. Activity (Activity):one of the components in the system provides a screen for an application component that a user can use to interact to accomplish a task. At +. >In applications, an Activity is usually a single screen, on which controls can be displayed, and also events of the user can be monitored and processed to respond.
It should be noted that the application hot start method provided in the embodiments of the present application may be applicable to any electronic device having a display screen, such as a mobile phone, a tablet computer, a wearable device (e.g., a wristwatch, a bracelet, a smart helmet, a smart glasses, etc.), a vehicle-mounted device, an augmented reality (augmented reality, AR)/Virtual Reality (VR) device, a notebook computer, an ultra-mobile personal computer (ultra-mobile personal computer, UMPC), a netbook, a personal digital assistant (personal digital assistant, PDA), etc., which are not limited in the embodiments of the present application. Also, exemplary embodiments of the electronic device include, but are not limited to, piggybackingHarmony />Or other operating system electronic devices.
The structure of the electronic device will be described below using a mobile phone as an example.
As shown in fig. 1, the mobile phone 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 charge management module 140, a power management module 141, a battery 142, an antenna 1, an antenna 2, a mobile communication module 150, a wireless communication module 160, an audio module 170, a speaker 170A, a receiver 170B, a microphone 170C, an earphone interface 170D, a sensor module 180, keys 190, a motor 191, an indicator 192, a camera 193, a display 194, a subscriber identity module (subscriber identification module, SIM) card interface 195, and the like. The sensor module 180 may include a pressure sensor 180A, a gyro sensor 180B, an air pressure sensor 180C, a magnetic sensor 180D, an acceleration sensor 180E, a distance sensor 180F, a proximity sensor 180G, a fingerprint sensor 180H, a temperature sensor 180J, a touch sensor 180K, an ambient light sensor 180L, a bone conduction sensor 180M, and the like.
The processor 110 may include one or more processing units, such as: the processor 110 may include an application processor (application processor, AP), a modem processor, a graphics processor (graphics processing unit, GPU), an image signal processor (image signal processor, ISP), a controller, a memory, a video codec, a digital signal processor (digital signal processor, DSP), a baseband processor, and/or a neural network processor (neural-network processing unit, NPU), etc. Wherein the different processing units may be separate devices or may be integrated in one or more processors. The controller may be a neural center or a command center of the mobile phone 100. The controller can generate operation control signals according to the instruction operation codes and the time sequence signals to finish the control of instruction fetching and instruction execution. A memory may also be provided in the processor 110 for storing instructions and data. In some embodiments, the memory in the 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 reuse the instruction or data, it can be called directly from the memory. Repeated accesses are avoided and the latency 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, and may specifically be a Mini USB interface, a Micro USB interface, a USB Type C interface, or the like. The USB interface 130 may be used to connect to a charger to charge the mobile phone 100, or may be used to transfer data between the mobile phone 100 and a peripheral device. The charge management module 140 is configured to receive a charge input from a charger. The power management module 141 is used for connecting the battery 142, and the charge management module 140 and the processor 110. The power management module 141 receives input from the battery 142 and/or the charge management module 140 and provides power to the processor 110, the internal memory 121, the external memory, the display 194, the camera 193, the wireless communication module 160, and the like.
The wireless communication function of the mobile phone 100 may be implemented 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. The antennas 1 and 2 are used for transmitting and receiving electromagnetic wave signals. Each antenna in the handset 100 may be used to cover a single or multiple communication bands. Different antennas may also be multiplexed to improve the utilization of the antennas. For example: the antenna 1 may be multiplexed into a diversity antenna of a wireless local area network. In other embodiments, the antenna may be used in conjunction with a tuning switch.
The mobile communication module 150 may provide a solution for wireless communication including 2G/3G/4G/5G, etc. applied to the handset 100. The mobile communication module 150 may include at least one filter, switch, power amplifier, low noise amplifier (low noise amplifier, LNA), etc. The mobile communication module 150 may receive electromagnetic waves from the antenna 1, perform processes such as filtering, amplifying, and the like on the received electromagnetic waves, and transmit the processed electromagnetic waves to the modem processor for demodulation. The mobile communication module 150 can amplify the signal modulated by the modem processor, and convert the signal into electromagnetic waves through the antenna 1 to radiate. In some embodiments, at least some of the functional modules of the mobile communication module 150 may be disposed in the processor 110. In some embodiments, at least some of the functional modules of the mobile communication module 150 may be provided in the same device as at least some of the modules of the processor 110.
The wireless communication module 160 may provide solutions for wireless communication including wireless local area network (wireless local area networks, WLAN) (e.g., wireless fidelity (wireless fidelity, wi-Fi) network), bluetooth (BT), global navigation satellite system (global navigation satellite system, GNSS), frequency modulation (frequency modulation, FM), near field wireless communication technology (near field communication, NFC), infrared technology (IR), etc. applied to the handset 100. The wireless communication module 160 may be one or more devices that integrate at least one communication processing module. The wireless communication module 160 receives electromagnetic waves via the antenna 2, modulates the electromagnetic wave signals, filters the electromagnetic wave signals, and transmits the processed signals to the processor 110. The wireless communication module 160 may also receive a signal to be transmitted from the processor 110, frequency modulate it, amplify it, and convert it to electromagnetic waves for radiation via the antenna 2.
In some embodiments, the antenna 1 and the mobile communication module 150 of the handset 100 are coupled, and the antenna 2 and the wireless communication module 160 are coupled, so that the handset 100 can communicate with a network and other devices through wireless communication technology. The wireless communication techniques may include a global system for mobile communications (global system for mobile communications, GSM), general packet radio service (general packet radio service, GPRS), code division multiple access (code division multiple access, CDMA), wideband code division multiple access (wideband code division multiple access, WCDMA), time division code division multiple access (time-division code division multiple access, TD-SCDMA), long term evolution (long term evolution, LTE), fifth generation (the fifth generation, 5G) mobile communication systems, future communication systems such as sixth generation (6th generation,6G) systems, etc., BT, GNSS, WLAN, NFC, FM and/or IR techniques, etc. The GNSS may include a global satellite positioning system (global positioning system, GPS), a global navigation satellite system (global navigation satellite system, GLONASS), a beidou satellite navigation system (beidou navigation satellite system, BDS), a quasi zenith satellite system (quasi-zenith satellite system, QZSS) and/or a satellite based augmentation system (satellite based augmentation systems, SBAS).
The display 194 is used to display a display interface of an application or the like. The display 194 includes a display panel. The display panel may employ a liquid crystal display (liquid crystal display, LCD), an organic light-emitting diode (OLED), an active-matrix organic light-emitting diode (AMOLED) or an active-matrix organic light-emitting diode (matrix organic light emitting diode), a flexible light-emitting diode (flex), a mini, a Micro led, a Micro-OLED, a quantum dot light-emitting diode (quantum dot light emitting diodes, QLED), or the like. In some embodiments, the cell phone 100 may include 1 or N display screens 194, N being a positive integer greater than 1. In embodiments of the present application, the display 194 may be used to display an application interface.
The camera 193 is used to capture still images or video. The camera 193 may include a front camera and a rear camera.
The internal memory 121 may be used to store computer executable program code including instructions. The processor 110 executes various functional applications of the cellular phone 100 and data processing by executing instructions stored in the internal memory 121. The internal memory 121 may include a storage program area and a storage data area. The storage program area may store an operating system, and software code of at least one application program (e.g., an aiqi application, a WeChat application, etc.), etc. The data storage area may store data (e.g., images, video, etc.) generated during use of the handset 100, etc. In addition, the internal memory 121 may include a high-speed random access memory, and may further include a nonvolatile memory such as at least one magnetic disk storage device, a flash memory device, a universal flash memory (universal flash storage, UFS), and the like.
The external memory interface 120 may be used to connect an external memory card, such as a Micro SD card, to extend the memory capabilities of the handset 100. The external memory card communicates with the processor 110 through an external memory interface 120 to implement data storage functions. For example, files such as pictures and videos are stored in an external memory card.
The handset 100 may implement audio functions through an audio module 170, a speaker 170A, a receiver 170B, a microphone 170C, an earphone interface 170D, an application processor, and the like. Such as music playing, recording, etc.
The pressure sensor 180A is used to sense a pressure signal, and may convert the pressure signal into an electrical signal. In some embodiments, the pressure sensor 180A may be disposed on the display screen 194. The gyro sensor 180B may be used to determine the motion gesture of the cell phone 100. In some embodiments, the angular velocity of the handset 100 about three axes (i.e., x, y, and z axes) may be determined by the gyro sensor 180B.
The gyro sensor 180B may be used to determine the motion gesture of the cell phone 100. In some embodiments, the angular velocity of the handset 100 about three axes (i.e., x, y, and z axes) may be determined by the gyro sensor 180B. The gyro sensor 180B may be used for photographing anti-shake. For example, when the shutter is pressed, the gyro sensor 180B detects the shake angle of the mobile phone 100, calculates the distance to be compensated by the lens module according to the angle, and makes the lens counteract the shake of the mobile phone 100 through the reverse motion, thereby realizing anti-shake. The gyro sensor 180B may also be used for navigating, somatosensory game scenes.
The air pressure sensor 180C is used to measure air pressure. In some embodiments, the handset 100 calculates altitude from the barometric pressure value measured by the barometric pressure sensor 180C, aiding in positioning and navigation. The magnetic sensor 180D includes a hall sensor. The mobile phone 100 can detect the opening and closing of the flip cover using the magnetic sensor 180D. In some embodiments, when the mobile phone 100 is a flip phone, the mobile phone 100 may detect the opening and closing of the flip based on the magnetic sensor 180D. And then according to the detected opening and closing state of the leather sheath or the opening and closing state of the flip, the characteristics of automatic unlocking of the flip and the like are set. The acceleration sensor 180E can detect the magnitude of acceleration of the mobile phone 100 in various directions (typically three axes). The magnitude and direction of gravity can be detected when the handset 100 is stationary. The electronic equipment gesture recognition method can also be used for recognizing the gesture of the electronic equipment, and is applied to horizontal and vertical screen switching, pedometers and other applications.
A distance sensor 180F for measuring a distance. The cell phone 100 may measure the distance by infrared or laser. In some embodiments, the cell phone 100 may range using the distance sensor 180F to achieve quick focus. The proximity light sensor 180G may include, for example, a Light Emitting Diode (LED) and a light detector, such as a photodiode. The light emitting diode may be an infrared light emitting diode. The cellular phone 100 emits infrared light outward through the light emitting diode. The cell phone 100 uses a photodiode to detect infrared reflected light from nearby objects. When sufficient reflected light is detected, it can be determined that there is an object in the vicinity of the cell phone 100. When insufficient reflected light is detected, the handset 100 can determine that there is no object in the vicinity of the handset 100. The mobile phone 100 can detect that the user holds the mobile phone 100 close to the ear to talk by using the proximity light sensor 180G, so as to automatically extinguish the screen to achieve the purpose of saving electricity. The proximity light sensor 180G may also be used in holster mode, pocket mode to automatically unlock and lock the screen.
The ambient light sensor 180L is used to sense ambient light level. The cell phone 100 may adaptively adjust the brightness of the display 194 based on perceived ambient light levels. The ambient light sensor 180L may also be used to automatically adjust white balance when taking a photograph. The ambient light sensor 180L may also cooperate with the proximity light sensor 180G to detect if the handset 100 is in a pocket to prevent false touches. The fingerprint sensor 180H is used to collect a fingerprint. The mobile phone 100 can utilize the collected fingerprint characteristics to realize fingerprint unlocking, access an application lock, fingerprint photographing, fingerprint incoming call answering and the like.
The temperature sensor 180J is for detecting temperature. In some embodiments, the handset 100 performs a temperature processing strategy using the temperature detected by the temperature sensor 180J. For example, when the temperature reported by temperature sensor 180J exceeds a threshold, handset 100 performs a reduction in the performance of a processor located near temperature sensor 180J in order to reduce power consumption to implement thermal protection. In other embodiments, when the temperature is below another threshold, the mobile phone 100 heats the battery 142 to avoid the low temperature causing the mobile phone 100 to be abnormally shut down. In other embodiments, when the temperature is below a further threshold, the handset 100 performs boosting of the output voltage of the battery 142 to avoid abnormal shutdown caused by low temperatures.
The touch sensor 180K, also referred to as a "touch panel". The touch sensor 180K may be disposed on the display screen 194, and the touch sensor 180K and the display screen 194 form a touch screen, which is also called a "touch screen". The touch sensor 180K is for detecting a touch operation acting thereon or thereabout. The touch sensor may communicate the detected touch operation to the application processor to determine the touch event type. Visual output related to touch operations may be provided through the display 194. In other embodiments, the touch sensor 180K may be disposed on the surface of the mobile phone 100 at a different location than the display 194. In some embodiments of the present application, the touch sensor 180K may detect a touch operation of the user on the display screen, for example, may detect a click operation of the user on the display screen 194 on the application icon, and then the mobile phone 100 may open the application in response to the click operation. Or when the display 194 displays the application interface, the touch sensor 180K may detect a bottom-up sliding operation on the application interface, and then the mobile phone 100 may return to the main interface in response to the sliding operation.
The bone conduction sensor 180M may acquire a vibration signal. In some embodiments, bone conduction sensor 180M may acquire a vibration signal of a human vocal tract vibrating bone pieces. The bone conduction sensor 180M may also contact the pulse of the human body to receive the blood pressure pulsation signal.
The keys 190 include a power-on key, a volume key, etc. The keys 190 may be mechanical keys. Or may be a touch key. The handset 100 may receive key inputs, generating key signal inputs related to user settings and function control of the handset 100. The motor 191 may generate a vibration cue. The motor 191 may be used for incoming call vibration alerting as well as for touch vibration feedback. For example, touch operations acting on different applications (e.g., photographing, audio playing, etc.) may correspond to different vibration feedback effects. The indicator 192 may be an indicator light, may be used to indicate a state of charge, a change in charge, a message indicating a missed call, a notification, etc. The SIM card interface 195 is used to connect a SIM card. The SIM card may be inserted into the SIM card interface 195 or removed from the SIM card interface 195 to enable contact and separation with the handset 100.
It will be appreciated that the components shown in fig. 1 are not intended to be limiting in detail, and that the handset may also include more or fewer components than shown, or may be combined with certain components, or may be split into certain components, or may be arranged in different components. In the following embodiments, a mobile phone 100 shown in fig. 1 will be described as an example.
The software system of the mobile phone 100 may adopt a layered architecture, including an event-driven architecture, a microkernel architecture, a microservice architecture, or a cloud architecture. In this embodiment, taking an Android system with a layered architecture as an example, a software structure of the mobile phone 100 is illustrated. It should be understood that the system in the embodiments of the present application may also be a hong system, which is not limited in this application.
Fig. 2 is a software configuration block diagram of the mobile phone 100 according to the embodiment of the present application. The layered architecture divides the software into several layers, each with distinct roles and branches. The layers communicate with each other through a software interface. In some embodiments, the Android system is an application layer, an application framework layer, an Zhuoyun row (ART) and native C/c++ library, a hardware abstraction layer (Hardware Abstract Layer, HAL), and a kernel layer, respectively, from top to bottom.
The application layer may include a series of application packages. As shown in fig. 2, applications such as desktop, music, and video may be installed in the application layer.
The application framework layer provides an application programming interface (application programming interface, API) and programming framework for application programs of the application layer. The application framework layer includes a number of predefined functions.
As shown in FIG. 2, the application framework layer may include an activity manager, a window manager, a content provider, a view system, a resource manager, a notification manager, an input manager, and so forth.
The activity manager may provide activity management services (Activity Manager Service, AMS) that may be used for system component (e.g., activity, service, content provider, broadcast receiver) start-up, handoff, scheduling, and application process management and scheduling tasks. In some embodiments of the present application, the AMS may be configured to skip the creation process of the transparent Activity and directly create the real Activity when detecting that the application interface is a transparent interface.
The window manager provides window management services (Window Manager Service, WMS) that may be used for window management, window animation management, surface management, and as a transfer station to the input system. It should be appreciated that both AMS and WMS belong to a system service process.
The content provider is used to store and retrieve data and make such data accessible to applications. The data may include video, images, audio, calls made and received, browsing history and bookmarks, phonebooks, etc.
The view system includes visual controls, such as controls to display text, controls to display pictures, and the like. The view system may be used to build applications. The display interface may be composed of one or more views. For example, a display interface including a text message notification icon may include a view displaying text and a view displaying a picture.
The resource manager provides various resources for the application program, such as localization strings, icons, pictures, layout files, video files, and the like.
The notification manager allows the application to display notification information in a status bar, can be used to communicate notification type messages, can automatically disappear after a short dwell, and does not require user interaction. Such as notification manager is used to inform that the download is complete, message alerts, etc. The notification manager may also be a notification in the form of a chart or scroll bar text that appears on the system top status bar, such as a notification of a background running application, or a notification that appears on the screen in the form of a dialog window. For example, a text message is prompted in a status bar, a prompt tone is emitted, the electronic device vibrates, and an indicator light blinks, etc.
The input manager may provide input management services (Input Manager Service, IMS), which may be used to manage inputs to the system, such as touch screen inputs, key inputs, sensor inputs, and the like. The IMS retrieves events from the input device node and distributes the events to the appropriate windows through interactions with the WMS.
The android runtime includes a core library and An Zhuoyun rows. The android runtime is responsible for converting source code into machine code. Android runtime mainly includes employing Advanced Or Time (AOT) compilation techniques and Just In Time (JIT) compilation techniques.
The core library is mainly used for providing the functions of basic Java class libraries, such as basic data structures, mathematics, IO, tools, databases, networks and the like. The core library provides an API for the user to develop the android application.
The native C/c++ library may include a plurality of functional modules. For example: surface manager (surface manager), media Framework (Media Framework), libc, openGL ES, SQLite, webkit, etc.
The surface manager is used for managing the display subsystem and providing fusion of 2D and 3D layers for a plurality of application programs. Media frames support a variety of commonly used audio, video format playback and recording, still image files, and the like. The media library may support a variety of audio and video encoding formats, such as MPEG4, h.264, MP3, AAC, AMR, JPG, PNG, etc. OpenGL ES provides for drawing and manipulation of 2D graphics and 3D graphics in applications. SQLite provides a lightweight relational database for applications of the electronic device 100.
The hardware abstraction layer HAL runs in a user space (user space), encapsulates the kernel layer driver and provides a call interface to an upper layer. The HAL may include, among other things, a display module, an audio module, a bluetooth module, etc.
The kernel layer is a layer between hardware and software. The inner core layer at least comprises a display driver, a camera driver, an audio driver and a sensor driver.
The following embodiments are described by taking an example of an architecture applied to the mobile phone 100 shown in fig. 1.
Furthermore, at least one of the following embodiments is directed to, including one or more; wherein, a plurality refers to greater than or equal to two. In addition, it should be understood that in the description of this application, the words "first," "second," and the like are used merely for distinguishing between the descriptions.
Referring to fig. 3, a flowchart of an application hot start method provided in an embodiment of the present application, referring to fig. 3, the method may include the following steps:
s301: the handset 100 detects a first operation on a first application.
The first application is a background application, and the first operation may be an operation for triggering the first application to start by a user, for example, may be a clicking operation on an application icon of the first application. Of course, there are various ways to launch the first application, for example, the first application may also slide up on the display screen, trigger to display the multitasking window, and then click the interface of the first application in the multitasking window, or may also be a voice triggering operation, which is not limited in this application.
In some embodiments, the handset 100 may display the second interface of the first application before detecting the first operation. When the mobile phone 100 detects a second operation of switching the first application to the background on the second interface, the first application may be switched from the foreground operation to the background operation in response to the second operation. For example, the second operation may be an operation to slide up back to the desktop (main interface).
S302: the mobile phone 100 responds to the first operation to obtain the interface transparency parameter of the first interface.
Because whether the application has a transparent interface in the starting process is related to the logic set by a developer in the application development stage, when the application itself sets the transparent interface to be firstly established in the starting process and then the real interface to be established, the transparent interface exists in the starting process of the application. It should be appreciated that the transparent interface may correspond to the transparent Activity below; the real interface may correspond to the target Activity below.
When the application itself is not set to create the transparent interface first and then create the real interface, that is, directly create the real interface, the application will not have the transparent interface in the starting process.
In the prior art, only a part of applications in the mobile phone may have a transparent interface in the starting process, and after the user triggers the starting operation of the applications, it is not known to the mobile phone whether the applications started by the user have the transparent interface. Therefore, based on the method provided in the embodiments of the present application, the mobile phone 100 may obtain the interface transparency parameter of the first interface, and then determine whether the first interface is a transparent interface based on the interface transparency parameter.
S303: the mobile phone 100 determines whether the first interface is a transparent interface according to the interface transparency parameter of the first interface. If the first interface is a transparent interface, the process continues to S304.
In some embodiments, the mobile phone 100 may determine whether the interface is a transparent interface according to the interface transparency parameter. Specifically, when the transparency parameter of the interface is greater than the transparency threshold, the interface may be considered as a non-transparent interface; when the interface transparency parameter is less than or equal to the transparency threshold, the interface may be considered a transparent interface. Illustratively, it is assumed that the interface transparency parameter is 0-1, 0 indicating that the interface is completely transparent, and 1 indicating that the interface is completely opaque. For example, the transparency threshold is 0, then the interface is a non-transparent interface when the interface transparency parameter is greater than 0, and is a transparent interface when the interface transparency parameter is less than or equal to 0.
For another example, assuming that the transparency parameter has a value ranging from 0 to 255 and the transparency threshold is 10, when the interface transparency parameter is less than 10, the mobile phone 100 may determine that the interface is a transparent interface; when the interface transparency parameter is greater than or equal to 10, the mobile phone 100 may determine that the interface is a non-transparent interface.
It should be understood that the above example is only an example, and in practical application, the interface may be a transparent interface when the transparency parameter of the interface is greater than the transparency threshold; when the transparency parameter of the interface is less than or equal to the transparency threshold, the interface is a non-transparent interface, which is not limited in this application.
In some embodiments, the mobile phone 100 may determine whether the first interface is a transparent interface according to the setAlpha () function.
It should be understood that if the first interface is a transparent interface, then the first application is an application that will have a transparent interface during the launch process; if the first interface is not a transparent interface, the first application is an application that does not have a transparent interface during the launch process.
S304: the handset 100 initiates the target activity.
In some embodiments, when the first interface is a transparent interface, the mobile phone 100 may skip the process of creating the transparent interface and directly initiate a target Activity (Activity). The mobile phone 100 may not create transparent Activity, which can reduce the creation of an Activity compared to the prior art, and can shorten the time of application hot start.
S305: the handset 100 draws a second interface to launch the first application.
The second interface is an interface displayed by the first application before the first application is switched to the background application. Exemplary, assume a first applicationIs thatThe application, such as a user, opens the home web through a hundred degree application and is browsing the home page of the home web. If the user is now sliding back up to the main interface, the hundred degrees application may enter background operation. Then, when the user opens the hundred-degree application again, if the first interface is a transparent interface, the mobile phone 100 may directly display a second interface, where the second interface is an interface corresponding to the homepage of the official website, so as to complete the hot start procedure of the hundred-degree application.
In this embodiment of the present application, when determining that the first interface is a transparent interface, the mobile phone 100 may skip the process of creating the transparent interface, and directly start the target Activity without creating the transparent Activity, where the interface corresponding to the target Activity is the second interface. If the mobile phone 100 does not determine whether the first interface is a transparent interface according to the scheme of the prior art, and before S304, the mobile phone 100 needs to create a transparent Activity, but compared with the prior art, the scheme of the embodiment of the present application can reduce the creation of the transparent Activity, shorten the time of application hot start, and accelerate the process of application hot start.
The application hot start method in the embodiment of the present application is described below with reference to a software architecture. Referring to fig. 4, a flowchart of an application hot start method provided in an embodiment of the present application, referring to fig. 4, the method may include:
s401: the first application receives a first operation.
The first application is a background application, and the first operation is a triggering operation for starting the first application, for example, the clicking operation of the application icon of the first application on the desktop by the user may be performed. Of course, the first operation may be other operations, such as clicking a window corresponding to the first application in the multitasking window, or may also be opening the first application through a voice assistant, for example, the user may issue an instruction "small skill, open XX application", which is not limited in this application.
In some embodiments, the first application may switch from a foreground operation to a background operation before receiving the first operation. For example, the first application may receive a second operation to switch the first application to the background, and then the mobile phone 100 may switch the first application from the foreground operation to the background operation in response to the second operation. The second operation may be, for example, an operation to slide up back to the desktop (main interface).
S402: the desktop application notifies the AMS of the Activity of launching the first application.
In some embodiments, after the user clicks on the first application on the desktop, a process of the desktop application may call a startActivity () function and send a message to the AMS through an inter-process communication mechanism Binder mechanism to cause the AMS to launch the Activity of the first application. Since the first application is a background application, there is an application process, and thus the AMS does not need to create the application process again.
It should be appreciated that when the user opens the first application as a foreground application before switching to a background application, the AMS has already created an application process for the application, and thus, when the user opens the first application again, there is no need to create an application process again.
S403: the AMS determines whether the first interface is a transparent interface.
In some embodiments, when the first interface is a transparent interface, execution continues with S404.
In some embodiments, the AMS may obtain the interface transparency parameter of the first interface and then determine whether the first interface is a transparent interface according to the interface transparency parameter. If the interface transparency parameter of the first interface is greater than the transparency threshold, the first interface is a non-transparent interface; and if the interface transparency parameter of the first interface is smaller than or equal to the transparency threshold, the first interface is a transparent interface. Of course, the above-mentioned judging manner is merely an example, and for example, when the interface transparency parameter of the first interface is smaller than the transparency threshold, it may be determined that the first interface is a transparent interface; and when the transparency parameter of the first interface is greater than or equal to the transparency threshold, determining that the first interface is a non-transparent interface.
S404: AMS skips creation of transparent interfaces.
In this embodiment of the present application, if the AMS determines that the first interface is a transparent interface, the AMS may notify, through the Binder mechanism, the first application process to execute the Activity pause () function, so as to intercept the transparent Activity. That is, if the AMS recognizes a transparent Activity during the hot start of the first application, creation of the transparent Activity is skipped.
S405: the AMS initiates a target Activity.
In some embodiments, the AMS skips creation of transparent activities, may directly launch target activities, execute lifecycle methods of target activities, such as onstart (), onsume (), and the like.
S406: and the first application draws a second interface to finish the hot start.
The second interface is an interface displayed before the first application is switched to the background application.
In some embodiments, the first application may draw a second interface corresponding to the target Activity and then display the second interface, thereby completing the hot start process of the first application.
Through the embodiment, when the AMS identifies that the first interface is the transparent interface, the AMS can actively skip the creation of the transparent interface, so that the time for hot start of the application can be shortened, and the efficiency of hot start of the application can be improved.
In the embodiments provided in the present application, the method provided in the embodiments of the present application is described from the point of view that the electronic device is the execution subject. In order to implement the functions in the methods provided in the embodiments of the present application, the electronic device may include a hardware structure and/or a software module, where the functions are implemented in the form of a hardware structure, a software module, or a hardware structure plus a software module. Some of the functions described above are performed in a hardware configuration, a software module, or a combination of hardware and software modules, depending on the specific application of the solution and design constraints.
As shown in fig. 5, further embodiments of the present application disclose an electronic device, which may be an electronic device with a display screen. Referring to fig. 5, the electronic device 500 includes: a display 501; one or more processors 502; one or more memories 503; one or more sensors 504 (not shown), a plurality of applications 505 (not shown); and one or more computer programs 506 (not shown), which may be coupled via one or more communication buses 507.
Wherein the display 501 is used to display a display interface of an application in the electronic device. The memory 503 has stored therein one or more computer programs, including instructions; the processor 502 invokes the instructions stored in the memory 503 so that the electronic device 500 may apply the warm boot method of the above embodiment.
Illustratively, the instructions, when executed on the electronic device 500, cause the electronic device 500 to perform the steps of: detecting a first operation to launch a first application; the first application is a background application; responding to the first operation, and starting a target activity of the first application when the first interface is determined to be a transparent interface; and drawing a second interface corresponding to the target activity, and starting the first application.
In the embodiments of the present application, the processor 502 may be a general purpose processor, a digital signal processor, an application specific integrated circuit, a field programmable gate array or other programmable logic device, a discrete gate or transistor logic device, or a discrete hardware component, where the methods, steps, and logic blocks disclosed in the embodiments of the present application may be implemented or performed. The general purpose processor may be a microprocessor or any conventional processor or the like. The steps of a method disclosed in connection with the embodiments of the present application may be embodied directly in a hardware processor for execution, or in a combination of hardware and software modules in the processor for execution. The software module may be located in a memory 503, the processor 502 reading the program instructions in the memory 503, in combination with its hardware to perform the steps of the method described above.
In the embodiment of the present application, the memory 503 may be a nonvolatile memory, such as a hard disk (HDD) or a Solid State Drive (SSD), or may be a volatile memory (RAM). The memory may also be any other medium that can be used to carry or store desired program code in the form of instructions or data structures and that can be accessed by a computer, but is not limited to such. The memory in the embodiments of the present application may also be a circuit or any other device capable of implementing a memory function, for storing instructions and/or data.
It will be clear to those skilled in the art that, for convenience and brevity of description, specific working procedures of the apparatus and units described above may refer to corresponding procedures in the foregoing method embodiments, which are not described herein again.
Based on the above embodiments, the present application further provides a computer storage medium, in which a computer program is stored, which when executed by a computer, causes the computer to execute the application hot start method provided in the above embodiments.
Also provided in embodiments of the present application is a computer program product comprising instructions that, when run on a computer, cause the computer to perform the application warm-start method provided in the above embodiments.
Embodiments of the present application are described with reference to flowchart illustrations and/or block diagrams of methods, apparatus (systems), and computer program products according to embodiments of the application. It will be understood that each flow and/or block of the flowchart illustrations and/or block diagrams, and combinations of flows and/or blocks in the flowchart illustrations and/or block diagrams, can be implemented by instructions. These instructions may be provided to a processor of a general purpose computer, special purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, create means for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be stored in a computer-readable memory that can direct a computer or other programmable data processing apparatus to function in a particular manner, such that the instructions stored in the computer-readable memory produce an article of manufacture including instruction means which implement the function specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be loaded onto a computer or other programmable data processing apparatus to cause a series of operational steps to be performed on the computer or other programmable apparatus to produce a computer implemented process such that the instructions which execute on the computer or other programmable apparatus provide steps for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.

Claims (11)

1. An application hot start method, comprising:
the electronic device detects a first operation of starting a first application; the first application is a background application;
the electronic equipment responds to the first operation, and starts a target activity of a first application when the first interface is determined to be a transparent interface;
And the electronic equipment draws a second interface corresponding to the target activity and starts the first application.
2. The method of claim 1, wherein determining that the first interface is a transparent interface comprises:
the electronic equipment acquires an interface transparency parameter of the first interface;
and the electronic equipment determines that the first interface is a transparent interface according to the interface transparency parameter.
3. The method of claim 2, wherein the electronic device determining that the first interface is a transparent interface based on the interface transparency parameter comprises:
and when the electronic equipment determines that the interface transparency parameter is smaller than or equal to a transparency threshold, determining that the first interface is a transparent interface.
4. The method of claim 2, wherein the electronic device obtaining the interface transparency parameter of the first interface comprises:
the electronic device determines a transparency parameter of the first interface according to the setAlpha () function.
5. The method of any of claims 1 to 4, wherein prior to the electronic device initiating the target activity of the first application, the method further comprises:
the electronic device skips creation of the first interface.
6. The method of any of claims 1-5, wherein, prior to the electronic device detecting the first operation, the method further comprises:
the electronic equipment displays the second interface of the first application;
the electronic equipment detects a second operation of switching the first application to a background;
and the electronic equipment responds to the second operation and switches the first application from the foreground to the background operation.
7. The method of claim 1, wherein the second interface is an interface that the first application displayed prior to switching to background operation.
8. The method of claim 1, wherein the first operation comprises any one of:
clicking operation on an application icon of the first application;
clicking operation on the window of the first application in the multitasking window;
voice-triggered operation.
9. The method of claim 6, wherein the second operation comprises any one of:
an operation of switching from the first application to a second application;
and returning to the operation of the main interface.
10. An electronic device, wherein the electronic device comprises a display screen; one or more processors; one or more memories; one or more sensors; a plurality of applications; and one or more computer programs;
Wherein the one or more computer programs are stored in the one or more memories, the one or more computer programs comprising instructions that, when executed by the one or more processors, cause the electronic device to perform the method of any of claims 1-9.
11. A computer readable storage medium having instructions stored therein, which when run on an electronic device, cause the electronic device to perform the method of any one of claims 1 to 9.
CN202211073836.5A 2022-09-02 2022-09-02 Application hot start method and electronic equipment Pending CN117687707A (en)

Priority Applications (2)

Application Number Priority Date Filing Date Title
CN202211073836.5A CN117687707A (en) 2022-09-02 2022-09-02 Application hot start method and electronic equipment
PCT/CN2023/115081 WO2024046237A1 (en) 2022-09-02 2023-08-25 Application hot start method and electronic device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202211073836.5A CN117687707A (en) 2022-09-02 2022-09-02 Application hot start method and electronic equipment

Publications (1)

Publication Number Publication Date
CN117687707A true CN117687707A (en) 2024-03-12

Family

ID=90100334

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202211073836.5A Pending CN117687707A (en) 2022-09-02 2022-09-02 Application hot start method and electronic equipment

Country Status (2)

Country Link
CN (1) CN117687707A (en)
WO (1) WO2024046237A1 (en)

Family Cites Families (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106598572B (en) * 2016-11-17 2018-08-03 武汉斗鱼网络科技有限公司 Method and device is exited in a kind of application
CN112860145B (en) * 2019-07-30 2022-08-26 华为技术有限公司 Application control method and electronic equipment
CN112346831A (en) * 2019-08-09 2021-02-09 华为技术有限公司 Method and device for managing abnormal application
CN114443156B (en) * 2021-12-24 2023-01-17 荣耀终端有限公司 Application processing method and electronic equipment

Also Published As

Publication number Publication date
WO2024046237A1 (en) 2024-03-07

Similar Documents

Publication Publication Date Title
WO2020103764A1 (en) Voice control method and electronic device
CN108028891B (en) Electronic apparatus and photographing method
CN110825301A (en) Interface switching method and electronic equipment
CN113553130B (en) Method for executing drawing operation by application and electronic equipment
CN116360725B (en) Display interaction system, display method and device
CN113641271B (en) Application window management method, terminal device and computer readable storage medium
CN114527901A (en) File dragging method and electronic equipment
EP4345669A1 (en) User privacy protection method and apparatus
WO2023029983A1 (en) Control content dragging method and system, and electronic device
CN117687707A (en) Application hot start method and electronic equipment
CN115794272B (en) Display method and electronic equipment
CN116662150B (en) Application starting time-consuming detection method and related device
CN118433302A (en) Element display method and electronic equipment
CN116795604B (en) Processing method, device and equipment for application exception exit
CN117009023B (en) Method for displaying notification information and related device
CN116048629B (en) System service switching method, control device, electronic equipment and storage medium
CN117632323A (en) Display method and electronic equipment
CN115562967B (en) Application program prediction method, electronic device and storage medium
WO2022143891A1 (en) Focal point synchronization method and electronic device
CN118092759A (en) Display method of application interface and electronic equipment
CN117008773A (en) Application compression method, decompression method and electronic equipment
CN118210989A (en) Thematic content display method and electronic equipment
CN117708801A (en) Resource access method and electronic equipment
CN117687708A (en) Starting-up method and electronic equipment
CN116301510A (en) Control positioning method and electronic equipment

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination