Application startup method, electronic device, chip system, storage medium and program product
By judging and aborting the dynamic effect of the target page when the application is started, the problem of splashing screen during the application is solved and the user experience is improved.
Patent Information
- Application Number
- CN202411515211.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-10-29
- Publication Date
- 2025-04-08
- Estimated Expiration
- 2044-10-29
AI Technical Summary
During the application startup process, electronic devices are prone to flashing screens, affecting the user experience.
When the application is started, it is determined whether the animation effect of the target page meets specific conditions (that is, there are the animation effect of other pages before the animation effect, and the animation effect type will reveal other participants), if it is satisfied, the animation effect of the target page will be aborted and the target page will be displayed directly.
It effectively avoids the flashing phenomenon caused by exposing other objects during the animation effects of other pages and the animation effects of the target page one by one, which improves the user experience.
Smart Images

Figure CN119025173B_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of terminal technology, and in particular to an application startup method, an electronic device, a chip system, a storage medium, and a program product. Background Art
[0002] Electronic devices can usually install multiple applications to meet the various needs of users. In order to reduce the visual abruptness of users when the electronic device interface changes, electronic devices can set some animation effects when applications are started or exited, so that the visual effect of application startup or exit is smoother, giving users a better user experience.
[0003] However, in some implementations, a screen flashing phenomenon may occur on the electronic device during the application startup process. Summary of the invention
[0004] The embodiments of the present application provide an application startup method, an electronic device, a chip system, a storage medium, and a program product, which are helpful in avoiding the screen flashing problem during the application startup process.
[0005] In a first aspect, an embodiment of the present application proposes an application startup method, the method comprising: in response to an operation of starting a first application, triggering an animation of a target page included in the first application; when the animation of the target page satisfies a first condition, terminating the animation of the target page and displaying the target page; wherein the first condition is used to indicate that there are animations of other pages before the animation of the target page, and the animation type of the target page belongs to the type of other participating objects that will expose the animation of the target page during the animation playback process.
[0006] Researchers have discovered that the screen flashing problem during the application startup process in the related technology is caused by the fact that the target page's animation is preceded by other pages' animations when the application is started. When the animations of other pages and the target page are played one by one, other objects participating in the target page's animation are exposed during the target page's animation playback. In an embodiment of the present application, when the animation of the target page triggered when the first application is started satisfies the first condition, the target page's animation is terminated (that is, the animation effect is not displayed), and the target page is directly displayed, wherein the first condition is used to indicate that the target page's animation is preceded by other pages' animations, and the target page's animation type belongs to the type that will expose other participating objects of the target page's animation during the animation playback. This method is conducive to avoiding the screen flashing phenomenon caused by exposing other pages participating in the target page's animation during the target page's animation playback when the animations of other pages and the target page are played one by one.
[0007] In combination with the first aspect, in certain implementations of the first aspect, before triggering the animation of the target page included in the first application in response to the operation of launching the first application, the method also includes: at a first moment, in response to the operation of launching the first application, launching the first application; at a second moment after the first moment, in response to the operation of exiting the first application, switching the first application to background operation; triggering the animation of the target page associated with the first application in response to the operation of launching the first application includes: at a third moment after the second moment, in response to the operation of launching the first application, triggering the animation of the target page included in the first application, and between the second moment and the third moment, the background program of the first application is not cleaned up.
[0008] In combination with the first aspect, in certain implementations of the first aspect, the participating objects of the animation of the target page and the participating objects of the animation of the other pages both include a first page, and the first page is played first when the animation of the target page and the animation of the other pages are played, and the first page is a snapshot of the corresponding page when the first application switches to background operation.
[0009] In this way, when the user starts the first application at the third moment, the corresponding snapshot when the first application switches to background operation, that is, the first page, can be quickly displayed, which visually improves the startup speed of the first application and helps improve the user experience.
[0010] In combination with the first aspect, in certain implementations of the first aspect, when the target page's dynamic effect satisfies the first condition, terminating the target page's dynamic effect includes: when the target page's dynamic effect satisfies the second condition and the first condition, terminating the target page's dynamic effect, the second condition being used to indicate that the target page's dynamic effect is running in a system process. In this way, the situation of terminating the target page's dynamic effect can be determined more accurately, which is conducive to improving the accuracy of the solution implementation and further improving the user experience.
[0011] In combination with the first aspect, in some implementations of the first aspect, the first condition includes: the window variable of the target page is a first value and the animation type of the target page is a first type.
[0012] In combination with the first aspect, in some implementations of the first aspect, the first type is a transparency change type or a translation type.
[0013] In combination with the first aspect, in some implementations of the first aspect, it is applied to an electronic device, and the electronic device includes a first transition module; when the animation of the target page meets the first condition, the animation of the target page is terminated, including: the first transition module calls a first function in response to the triggering of the animation of the target page to obtain first information, and the first information includes the window variable of the target page and the animation type of the target page; the first transition module calls a second function to terminate the animation of the target page when it is determined that the window variable of the target page is a first value and the animation type of the target page is a first type. In this way, it is helpful to avoid the screen flashing phenomenon caused by the exposure of other objects participating in the animation of the target page during the playback of the animation of the target page, while the animations of other pages before the animation of the target page and the animation of the target page are played one by one.
[0014] Optionally, the first function may be a TransitionInfo() function, and the second function may be an Abort() function, but this application does not limit this.
[0015] In combination with the first aspect, in some implementations of the first aspect, after the animation of the target page is terminated, the method further includes: the first transition module calls a third function to release the animation resource of the target page. This is conducive to saving memory of the electronic device.
[0016] In combination with the first aspect, in some implementations of the first aspect, the second condition includes: a system attribute value of the target page is a second value.
[0017] In combination with the first aspect, in some implementations of the first aspect, the electronic device includes a first transition module; when the target page's animation satisfies the second condition and the first condition, the target page's animation is terminated, including: the first transition module calls a first function in response to triggering the target page's animation to obtain second information, the second information including the target page's system attribute value, the target page's window variable, and the target page's animation type; the first transition module calls a second function to terminate the target page's animation when it is determined that the target page's system attribute value is the second value, the target page's window variable is the first value, and the target page's animation type is the first type. In this way, it is helpful to avoid the screen flashing phenomenon caused by other objects participating in the target page's animation being exposed during the target page's animation playback process when the animations of other pages before the target page's animation and the target page's animation are played one by one.
[0018] In a second aspect, an embodiment of the present application provides an application startup device, which may be an electronic device, or a chip or chip system in an electronic device. When the application startup device is an electronic device, the processing unit may be a processor. The application startup device may also include a storage unit, which may be a memory. The storage unit is used to store instructions, and the processing unit executes the instructions stored in the storage unit so that the electronic device implements an application startup method described in the first aspect or any possible implementation of the first aspect. When the application startup device is a chip or chip system in an electronic device, the processing unit may be a processor. The processing unit executes the instructions stored in the storage unit so that the electronic device implements an application startup method described in the first aspect or any possible implementation of the first aspect. The storage unit may be a storage unit in the chip (for example, a register, a cache, etc.), or a storage unit in the electronic device located outside the chip (for example, a read-only memory, a random access memory, etc.).
[0019] In a third aspect, an embodiment of the present application provides an electronic device, comprising one or more processors and a memory, wherein the memory is coupled to the one or more processors, the memory is used to store computer program code, the computer program code comprises computer instructions, and the one or more processors call the computer instructions so that the electronic device executes the method described in the first aspect or any possible implementation of the first aspect.
[0020] In a fourth aspect, an embodiment of the present application provides a computer-readable storage medium, which includes a computer program or instructions. When the computer program or instructions are run on a computer, the computer executes the method described in the first aspect or any possible implementation of the first aspect.
[0021] In a fifth aspect, an embodiment of the present application provides a computer program product, which includes a computer program code. When the computer program code runs on a computer, the computer executes the method described in the first aspect or any possible implementation of the first aspect.
[0022] In a sixth aspect, the present application provides a chip or a chip system, which includes one or more processors and a communication interface, wherein the communication interface and the one or more processors are interconnected by lines, and the one or more processors are used to run computer programs or instructions to execute the method described in the first aspect or any possible implementation of the first aspect. The communication interface in the chip can be an input / output interface, a pin or a circuit, etc.
[0023] In a possible implementation, the chip or chip system described above in the present application further includes at least one memory, in which instructions are stored. The memory may be a storage unit inside the chip, such as a register, a cache, etc., or a storage unit of the chip (such as a read-only memory, a random access memory, etc.).
[0024] It should be understood that the second to sixth aspects of the present application correspond to the technical solutions of the first aspect of the present application, and the beneficial effects achieved by each aspect and the corresponding feasible implementation methods are similar and will not be repeated here. BRIEF DESCRIPTION OF THE DRAWINGS
[0025] Figure 1 An example diagram of an application startup dynamic effect provided in an embodiment of the present application;
[0026] Figure 2 A software structure block diagram of an electronic device provided in an embodiment of the present application;
[0027] Figure 3 A schematic flow chart of an application startup method provided in an embodiment of the present application;
[0028] Figure 4 A schematic flowchart of another application startup method provided in an embodiment of the present application;
[0029] Figure 5 A schematic flow chart of another application startup method provided in an embodiment of the present application;
[0030] Figure 6 A hardware structure block diagram of an electronic device provided in an embodiment of the present application;
[0031] Figure 7 A structural block diagram of a chip provided in an embodiment of the present application. DETAILED DESCRIPTION
[0032] In order to clearly describe the technical solutions of the embodiments of the present application, some terms and technologies involved in the embodiments of the present application are briefly introduced below:
[0033] 1. Activity: Activity is the basic component of an application in the Android system. Usually, an Activity represents a separate page of an application. An application can contain multiple Activities, and each Activity usually contains a user interface that can interact with the user.
[0034] 2. Page: A page usually refers to the specific interface or screen that a user sees in an application. It can be understood as a part of an Activity or a representation of an Activity.
[0035] 3. The relationship between Activity and Page: The relationship between Page and Activity is that Page is attached to Activity, and Activity manages the life cycle and behavior of Page.
[0036] For example, it can be understood that Activity is a container for a page, where Activity is used to manage the creation, display, and destruction of the page. When the user navigates to a new Activity, the current Activity will be paused or destroyed, and the new Activity will be created and displayed.
[0037] As well, you can understand that a page is part of an Activity, and all views on the page (such as buttons, text boxes) are managed by the Activity. The layout and interface logic of the page are usually defined in the Activity's layout file (XML) and code.
[0038] 4. Animation effects, also known as motion effects, are the animation effects presented when switching between interfaces when the application is launched or closed. This effect can be a simple color gradient, shape change, or a more complex animation sequence. It aims to provide users with a visual transition, making the interface switching smoother and more natural.
[0039] 5. Application hot start: Application hot start refers to the process of the user restarting the application when the application is already running in the background. Specifically, when the application process is already running in the background (for example, the user presses the back key, the home key or other methods to switch the application to the background, but the application process is not completely terminated by the system), the system will not re-create a new process to start the application, but will directly use the existing process to restore the application's running state.
[0040] The most intuitive experience of hot start for users is that when an application is exited and put into the background, when the application is opened again, the page displayed by the application may be the page when it was exited to the background.
[0041] 6. Other terms
[0042] In the embodiments of the present application, words such as "first" and "second" are used to distinguish the same or similar items with substantially the same functions and effects. For example, the first chip and the second chip are only used to distinguish different chips, and their order is not limited. Those skilled in the art can understand that words such as "first" and "second" do not limit the quantity and execution order, and words such as "first" and "second" do not necessarily limit them to be different.
[0043] It should be noted that in the embodiments of the present application, words such as "exemplary" or "for example" are used to indicate examples, illustrations or descriptions. Any embodiment or design described as "exemplary" or "for example" in the present application should not be interpreted as being more preferred or more advantageous than other embodiments or designs. Specifically, the use of words such as "exemplary" or "for example" is intended to present related concepts in a specific way.
[0044] In the embodiments of the present application, "at least one" refers to one or more, and "more than one" refers to two or more. "And / or" describes the association relationship of associated objects, indicating that three relationships may exist. For example, A and / or B can represent: the existence of A alone, the existence of A and B at the same time, and the existence of B alone, where A and B can be singular or plural. The character " / " generally indicates that the previous and next associated objects are in an "or" relationship. "At least one of the following" or similar expressions refers to any combination of these items, including any combination of single or plural items. For example, at least one of a, b, or c can represent: a, b, c, ab, a--c, bc, or abc, where a, b, and c can be single or multiple.
[0045] 7. Electronic devices
[0046] The electronic device of the embodiment of the present application may include a handheld device, a vehicle-mounted device, etc. with a motion effect playback function. For example, some electronic devices are: mobile phones, tablet computers, PDAs, laptop computers, mobile internet devices (MIDs), wearable devices, virtual reality (VR) devices, augmented reality (AR) devices, wireless terminals in industrial control, wireless terminals in self driving, wireless terminals in remote medical surgery, wireless terminals in smart grids, wireless terminals in transportation safety, wireless terminals in smart cities, wireless terminals in smart homes, cellular phones, cordless phones, session initiation protocol (SIP) phones, wireless local loop (WLL) stations, personal digital assistants (PDAs), handheld devices with wireless communication capabilities, computing devices or other processing devices connected to wireless modems, vehicle-mounted devices, wearable devices, electronic devices in 5G networks or future evolved public land mobile communication networks (PLANs). The electronic devices in the network (PLMN) and the like are not limited to this in the embodiments of the present application.
[0047] As an example but not limitation, in the embodiments of the present application, the electronic device may also be a wearable device. Wearable devices may also be referred to as wearable smart devices, which are a general term for wearable devices that are intelligently designed and developed using wearable technology for daily wear, such as glasses, gloves, watches, clothing, and shoes. A wearable device is a portable device that is worn directly on the body or integrated into the user's clothes or accessories. Wearable devices are not only hardware devices, but also powerful functions achieved through software support, data interaction, and cloud interaction. Broadly speaking, wearable smart devices include full-featured, large-sized, and fully or partially independent of smartphones, such as smart watches or smart glasses, as well as devices that only focus on a certain type of application function and need to be used in conjunction with other devices such as smartphones, such as various types of smart bracelets and smart jewelry for vital sign monitoring.
[0048] In addition, in the embodiments of the present application, the electronic device may also be an electronic device in an Internet of Things (IoT) system. IoT is an important part of the future development of information technology. Its main technical feature is to connect objects to the network through communication technology, thereby realizing an intelligent network that interconnects people and machines and things.
[0049] The electronic device in the embodiments of the present application may also be referred to as: electronic device, user equipment (UE), mobile station (MS), mobile terminal (MT), access terminal, user unit, user station, mobile station, mobile station, remote station, remote terminal, mobile device, user terminal, terminal, wireless communication equipment, user agent or user device, etc.
[0050] In an embodiment of the present application, the electronic device includes a hardware layer, an operating system layer running on the hardware layer, and an application layer running on the operating system layer. The hardware layer includes hardware such as a central processing unit (CPU), a memory management unit (MMU), and a memory (also called main memory). The operating system can be any one or more computer operating systems that implement business processing through processes, such as a Linux operating system, a Unix operating system, an Android operating system, an iOS operating system, or a Windows operating system. The application layer includes applications such as browsers, address books, word processing software, and instant messaging software.
[0051] Based on the above introduction, the relevant technologies involved in this application are further introduced in detail below.
[0052] Electronic devices can usually install a variety of applications to meet the various needs of users. In some implementations, in order to reduce the user's abrupt feeling when switching interfaces and make the interface switching smoother when the user opens or exits an application, the electronic device can set some animation effects when the application is started or exited to improve the user experience. For example Figure 1 The application launch animation shown, Figure 1 The application startup animation shown can be understood as a zooming animation. Figure 1 As shown, when the user clicks Figure 1 In the case of application A in interface a, the page 101 corresponding to application A gradually changes from small to large to the screen size of the electronic device based on application A. The change process can be as follows: Figure 1 As shown in b in FIG. 1 , the page 101 is fully displayed and appears as follows Figure 1As shown in c.
[0053] In one possible scenario, while using application A, the user can switch application A to the background, then open application B, then exit application B, and reopen application A. If the user switches application A to the background and does not clean up the system background processes, the process of the user opening application A again can be understood as the process of hot starting application A.
[0054] However, in some applications, for example, when application A is hot-started, before displaying page 1 when the application exits to the background, a page 2 for transition will be displayed, and the animation of page 1 will be displayed when page 2 is closed (or it can also be understood as replacing page 2 with the animation of page 1). A transition effect of page 1 is achieved by changing the transparency of page 1. For example, the transparency of page 1 changes from completely transparent to completely opaque and then is displayed. This means that when page 2 is closed but the transition effect of page 1 is completely transparent, the user sees other objects participating in the animation of page 1, such as the wallpaper of an electronic device. After the transparency of page 1 can cover the wallpaper, the user sees page 1. This setting causes the user to see a screen flash when the animation is playing, affecting the user experience.
[0055] In order to further clarify the scenario in which the technical problem raised in this application arises, the process of generating the above technical problem will be described in detail below. For ease of understanding, before that, the software structure of the electronic device involved in this application is briefly introduced.
[0056] The software system of the electronic device may adopt a layered architecture, an event-driven architecture, a micro-core architecture, a micro-service architecture, or a cloud architecture. The embodiment of the present invention takes a system with a layered architecture as an example to exemplify the software structure of the electronic device.
[0057] Figure 2 A schematic diagram of the software structure of an electronic device provided in an embodiment of the present application is exemplarily shown.
[0058] like Figure 2 As shown, the layered architecture divides the software into several layers, each with a clear role and division of labor. The layers communicate with each other through interfaces. In some embodiments, the system may include an application layer, an application framework layer, a system runtime layer, a hardware abstraction layer (HAL), and a kernel layer.
[0059] It should be noted that the embodiments of the present application are illustrated using the Android system as an example. In other operating systems (such as Hongmeng system, IOS system, etc.), as long as the functions implemented by each functional module are similar to those in the embodiments of the present application, the solutions described in the present application can also be implemented.
[0060] The application layer may include a series of application packages, and icons corresponding to the application packages may be displayed on the screen, for example Figure 2 The target application shown in the figure may be a system application or a third-party application. This application does not specifically limit the applications included in the application layer.
[0061] The application framework layer provides application programming interface (API) and programming framework for the application layer applications. The application framework layer includes some predefined functions. Figure 2 As shown, the application framework layer may include, for example, an activity startup module, a transition control module, a transition processing module, a transition module 1, a transition module 2, an activity recording module, and an activity management service module. Among them, transition module 1 and transition module 2 belong to different system processes, and their functions are also different. The application hot start method provided in this application can be implemented through the interaction of these modules. The specific functions of these modules will be introduced in conjunction with specific embodiments below, and will not be introduced here for the time being.
[0062] The system runtime layer can include multiple functional modules, such as surface manager, media libraries, 3D graphics processing library (such as OpenGL ES), 2D graphics engine (such as SGL), media library, etc.
[0063] The hardware abstraction layer is used to abstract the hardware, implement the encapsulation of the Linux kernel driver, provide an interface to the upper layer, and shield the implementation details of the underlying hardware. The hardware abstraction layer may include Figure 2 The audio hardware abstraction layer shown in , etc.
[0064] The kernel layer is the layer between hardware and software. The kernel layer includes at least display driver, camera driver, audio driver, sensor driver, charging driver, etc.
[0065] It should be understood that in some embodiments, the layers implementing the same function may be called by other names, or the layers that can implement the functions of multiple layers may be regarded as one layer, or the layers that can implement the functions of multiple layers may be divided into multiple layers. The embodiments of the present application are not limited to this.
[0066] Next, the process of generating the technical problem described above is described in detail in combination with each software module in the electronic device and the corresponding process of the method 300.
[0067] Figure 3The schematic flow chart of an application hot start method 300 is shown as an example. The method 300 can be applied to an electronic device, and the software structure of the electronic device can be as follows Figure 2 As shown in the figure, the hardware structure can be as follows Figure 6 As shown.
[0068] As a possible scenario, after the user starts the target application, the user exits the target application to run in the background at time 1, and then opens the target application again at time 2 after time 1, and the process of the target application is not cleaned up between time 1 and time 2. In this way, at time 2, the target application (or it can also be understood as the process of the target application) in the electronic device responds to the user's operation of starting the target application, and initiates a start activity (startActivity) request to the activity start module through the inter-process communication mechanism (Binder IPC), and further triggers the process corresponding to method 300.
[0069] The method 300 includes:
[0070] S301. An activity start module receives an activity start request from a target application. The activity start request is used to instruct to start a target Activity. The target Activity includes an A page.
[0071] It should be understood that the target Activity is the Activity corresponding to the process of the target application.
[0072] Optionally, the activity start module can be understood as a module set in the application framework layer in the software structure of the electronic device. The activity start module can be responsible for processing the start request of the Activity. For example, the activity start module can find and start the target Activity. The activity start module can be understood as a function class, and the activity start module can be expressed as ActivityStarter, and ActivityStarter can be understood as a class name.
[0073] It is worth noting that in some implementations, page A may not be page B corresponding to when the target application exits to the background, but a page set by the target application for transition. Page A may have specific content, such as an application icon, or it may have no specific content and be used only for transition. This application does not limit the meaning of page A.
[0074] S302 , the activity start module sends instruction 1 to the transition control module, where instruction 1 is used to instruct to trigger the opening (open) animation effect of page A.
[0075] Optionally, the transition control module can be understood as a module set in the application framework layer in the software structure of the electronic device. The transition control module can be responsible for processing animation effects. For example, the transition control module can select a suitable transition object (such as transition module 1) based on the animation properties of the target page (such as the open animation of page A).
[0076] The transition control module may be understood as a function class, for example. The transition control module may be expressed as TransitionController, for example. TransitionController may be understood as a class name.
[0077] Further, the transition control module executes S303.
[0078] S303. The transition control module sends instruction 2 to the transition module 1. Instruction 2 is used to instruct the transition module 1 to collect participating objects related to the open animation of the A page.
[0079] In some implementations, the objects involved in the opening animation of page A may include page A, wallpaper, and a snapshot of page B obtained when the target application exits to the background. For ease of description, the snapshot is hereinafter referred to as page C. In some implementations, page C may also be referred to as a startup window. The setting of page C is intended to enable the electronic device to more quickly display the screen displayed when the target application exits to the background, so as to improve the user experience.
[0080] In some implementations, the hierarchical relationship of page A, wallpaper, and page C can be that page C is placed at the top, wallpaper is placed at the bottom, page A is placed between page C and wallpaper, and page A and page C have the same priority. It should be understood that during the opening animation of page A, when page A is loaded, or when the closing animation of page A is triggered (page A may not be loaded when the closing animation of page A is triggered), the electronic device can transfer or destroy page C.
[0081] Optionally, instruction 2 can also be used to instruct transition module 1 to synchronize the window status associated with page A, so that when the open animation of page A is ready, the window (Window) corresponding to the target Activity, that is, the window status associated with page A, meets the open animation playback conditions.
[0082] When the participating objects related to the opening of the A page are ready, the transition module 1 executes S304.
[0083] S304, transition module 1 sends instruction 3 to transition module 2, where instruction 3 is used to indicate that participating objects related to the open animation of page A are ready.
[0084] S305. Transition module 2 calculates the dispatching order of participating objects related to the opening of page A based on instruction 3, and dispatches these objects based on the animation type of the open animation.
[0085] Optionally, the animation type of the open animation may be a zoom type, but this application does not specifically limit this.
[0086] It should be understood that transition module 1 may belong to the system service process, and transition module 1 may be understood as a function class, which may be specifically expressed as Transition (which may be understood as a class name); transition module 2 may belong to the system interface process, and transition module 2 may also be understood as a function class, which may be specifically expressed as Transitions (which may also be understood as a class name). Optionally, transition module 1 may send instruction 3 to transition module 2 through an inter-process communication mechanism (BinderIPC).
[0087] Optionally, each module belonging to the system UI process may also be understood to be running on the shell side, but this application does not limit this.
[0088] Further, the transition module 2 executes S306.
[0089] S306 , the transition module 2 sends instruction 4 to the transition processing module, where instruction 4 is used to instruct the transition processing module to play the open animation of page A according to the object distributed by the transition module 2 .
[0090] The transition processing module may belong to a system UI process. The transition processing module may be understood as a function class, which may be specifically expressed as DefaultTransitionHandler. DefaultTransitionHandler may also be understood as a class name.
[0091] In some implementations, the transition processing module may be a processing program for playing the open animation of page A selected by the transition module 2. It should be understood that when the open animation of page A is played using the transition processing module, the electronic device display screen displays page A.
[0092] In a possible implementation, when the transition processing module plays the opening animation of page A, the target application instructs the activity recording module to instruct to close (finish) page A.
[0093] S307 , the activity recording module receives instruction 5 from the target application, where instruction 5 is used to instruct to close (finish) page A.
[0094] It should be understood that the activity record module can be used to manage the life cycle of the Activity, implement cross-process communication, etc. The activity record module can, for example, record the page information included in the target Activity, such as page A and page B pulled up by page A. The activity record module can be understood as a function class, which can be specifically expressed as ActivityRecord, and ActivityRecord can also be understood as a class name.
[0095] S308 , the activity recording module sends instruction 6 to the transition control module, where instruction 6 is used to request a closing animation of page A.
[0096] It should be understood that the final result of the hot start of the target application should be to display page B, which is the page displayed when the target application exits to the background. Some applications set the hot start to display the open animation of page A before displaying page B, and then display page B during the animation of closing page A, so the above instruction 6 can also be understood as requesting the opening animation of page B, but the instruction type is close type.
[0097] S309 , the transition control module triggers the closing animation of page A based on instruction 6 .
[0098] Further, the transition control module executes S310.
[0099] S310. The transition control module sends instruction 7 to the transition module 1. Instruction 7 is used to instruct the transition module 1 to collect participating objects related to the close animation of the A page.
[0100] It should be understood that the participating objects related to the close animation of page A may include page B, wallpaper and page C. The hierarchical relationship among page B, wallpaper and page C may be that page C is placed on the top layer, wallpaper is placed on the bottom layer, page B is placed between page C and wallpaper, and page B and page C have the same priority.
[0101] It should also be understood that when the close animation of page A is triggered, page C again participates in the close animation of page A. This can be understood as page C changing from being mounted under page A to being mounted under page B.
[0102] Optionally, instruction 7 may also be used to instruct the transition module 1 to synchronize the window status so that when the close animation of page A is ready, the window (Window) corresponding to the target Activity meets the close animation playing condition.
[0103] When the participating objects related to the close animation of page A are ready, the transition module 1 executes S311.
[0104] S311. Transition module 1 sends instruction 8 to transition module 2. Instruction 8 is used to indicate that participating objects related to the close animation of page A are ready.
[0105] S312. The transition module 2 calculates the dispatching order of the participating objects related to the close animation of the A page based on the instruction 8, and dispatches these objects based on the animation type of the open animation.
[0106] S313 , the transition module 2 sends an instruction 9 to the transition processing module, where the instruction 9 is used to instruct the transition processing module to play the close animation of page A according to the object distributed by the transition module 2 .
[0107] Optionally, the animation type of the close animation may be a transparency change type, but this application does not specifically limit this.
[0108] It should be understood that the closing animation of page A essentially displays the opening animation of page B, and it can also be understood as finishing page A through the opening animation of page B, and the animation type of the closing animation of page A is a transparency change type, which means that during the animation playback process, the transparency of page B gradually changes from completely transparent to completely opaque.
[0109] It should also be understood that in the close animation-related objects of page A, page C has the same priority as page B, that is, the transparency of page C changes consistently with that of page B, and page C will be destroyed after the content linked to page B is fully loaded.
[0110] In some implementations, during the continuous playback of the open and close animations of page A, the electronic device switches from displaying page A to displaying page B. However, since the transparency of page B gradually changes from completely transparent to completely opaque during the playback of the close animation of page A, i.e., the opening animation of page B, page B is completely transparent at the beginning of the animation playback. What the user sees on the electronic device display is actually other objects participating in the close animation of page A, such as the wallpaper placed at the bottom layer of page B. After the transparency of page B gradually changes to completely opaque, the wallpaper placed at the bottom layer is covered, and the user can see page B (page C is a snapshot of page B, and what the user sees is page B from the user's perspective. Page C is destroyed after the content linked to page B is loaded). In this way, the user will see the screen flashing phenomenon during this process, affecting the user experience.
[0111] In conjunction with the application hot start process described in the above method 300, the researchers of this application found that the cause of the above technical problem is that during the application hot start process, other transition pages are set before the opening animation of page B corresponding to when the application exits to the background, such as the above-mentioned page A, and the opening animation of page A (the participating objects of the opening animation of page A include page C, and page C is a snapshot of page B) is followed by the opening animation of page B (which has essentially the same meaning as the closing animation of page A above, the participating objects of the opening animation of page B also include page C, and the opening animation type of page B is a type that can reveal other objects in the animation (such as wallpaper set at the bottom layer) when playing). When the electronic device plays the opening animation of page A and page B continuously, the effect presented is that the electronic device displays page C, page C is removed after page A is loaded, and the electronic device displays page A. Then, because the animation of page B can reveal other objects in the animation (such as wallpaper set at the bottom layer) when playing, when the opening animation of page B is played immediately afterwards, the electronic device first displays other objects placed at the bottom layer in the opening animation of page B (such as wallpaper) and then displays page C. After page B is loaded, page C is destroyed and page B is displayed. Since page C is a snapshot of page B, that is, the electronic device displays page C and page B as the same screen to the user, which makes the user see the same screen displayed, exited, and displayed again during the continuous playback of the opening animation of page A and the opening animation of page B, and feel the phenomenon of screen flickering.
[0112] In some implementations, when the electronic device plays the opening animation of page A and the opening animation of page B continuously, the opening animation of page B is triggered without displaying page A, so that after the electronic device displays page C, page C is transferred, that is, it is transferred from being mounted on page A to being mounted on page B. In this case, after the electronic device plays the opening animation of page A and displays page C, it plays the opening animation of page B and displays page C again. After page B is loaded, page C is destroyed and page B is displayed. In this way, the user sees that the same screen is displayed, exited, and displayed again, and the electronic device will also feel that the screen is flashing.
[0113] It should be noted that in the problem scenario described in the above-mentioned combination method 300, the animation of page A before the animation of page B contains the same participating objects as the animation of page B (for example, the above-mentioned page C). It should be understood that regardless of whether the animation of page B and the animation of page A contain the same participating objects, when the animation of page B is played after the animation of page A is played, if the animation type of page B is of a type that will reveal other objects participating in the animation during the animation playback process, since the other participating objects in the animation of page B may not be related to the application (for example, wallpaper), the user will still see the page related to the application (for example, the above-mentioned page C and / or page A) displayed, followed by the page unrelated to the application (for example, wallpaper), and then the page related to the application (page C and page B) displayed, and the electronic device may also experience screen flickering when the animation is played continuously and quickly.
[0114] Therefore, in response to the above technical problems, the embodiments of the present application provide an application startup method, an electronic device, a chip system, a storage medium, and a program product. When the animation of the target page associated with the first application (the target application described above) is started and satisfies the first condition, the animation of the target page is terminated (that is, the animation effect is not displayed), and the target page is directly displayed, wherein the first condition is used to indicate that the animation of the target page is preceded by the animation of other pages, and the animation type of the target page belongs to the type that will expose other participating objects of the animation of the target page during the animation playback process. This method is conducive to avoiding the screen flashing phenomenon caused by exposing other objects participating in the animation of the target page during the playback of the animation of the target page while the animations of other pages and the animation of the target page are played one by one.
[0115] It is worth noting that the types of animations that will reveal other pages participating in the animation during the animation playback are not limited to the transparency changes described above, but may also be animation effects such as translation, flying in and out, etc. This application does not make specific limitations on this.
[0116] Next, combine Figure 4 The application startup method 400 provided in the embodiment of the present application is described in detail.
[0117] Figure 4 An example of an application startup method 400 provided in an embodiment of the present application is shown. The method 400 can be applied to an electronic device. The software structure of the electronic device can be as follows: Figure 2 As shown, the hardware structure can be as follows Figure 6 As shown.
[0118] As a possible scenario, after the user starts the target application, the user exits the target application to run in the background at time 1, and then opens the target application again at time 2 after time 1, and the process of the target application is not cleared between time 1 and time 2. Thus, at time 2, the electronic device triggers the process corresponding to method 400 in response to the user's operation of starting the target application.
[0119] The method 400 comprises the following steps:
[0120] S401 , a transition control module receives instruction 10 , where instruction 10 is used to instruct triggering of a dynamic effect of a target page.
[0121] Optionally, instruction 10 may be an instruction from an activity startup module, such as instruction 1 similar to the above-mentioned S302, or an instruction from an activity recording module, such as instruction 6 similar to the above-mentioned S308; and the target page may refer to the above-mentioned page A, or may refer to the above-mentioned page B, or other transition pages set for hot start of the target application; the animation of the target page may be an open animation or a close animation, and the present application does not make any specific limitations on this.
[0122] In one possible implementation, instruction 10 is an instruction from an activity start module. The activity start module receives a start activity request from the target application before receiving instruction 10. One implementation of the target application sending the start activity request may be: the target application may send a start activity request to the activity start module by calling the execute() function under the ActivityStarter class, but the present application does not impose any restrictions on the specific class name and function name. The start activity request may include the identifier of the target Activity and the identifier of the target page included in the target Activity. Further, in this case, a possible implementation of the activity start module sending instruction 10 may be: the activity start module may send instruction 10 to the transition control module by calling the createTransition() function under the TransitionController class to instruct the transition control module to trigger the animation of the target page, but the present application does not impose any restrictions on the specific class name and function name.
[0123] In another possible implementation, the instruction 10 is an instruction from the activity recording module. A possible implementation of the activity recording module sending the instruction 10 is: the activity recording module calls the requestCloseTransitionIfNeeded() function under the TransitionController class to send the instruction 10 to the transition control module to instruct the transition control module to trigger the animation of the target page, but the application does not limit the specific class name and function name.
[0124] S402: The transition control module sends instruction 11 to the transition module 1, where instruction 11 is used to instruct the transition module 1 to collect participating objects related to the dynamic effect of the target page.
[0125] Optionally, the transition control module can send instruction 11 to the transition module 1 by calling the OnTransactionReady() function under the Transition class to instruct the transition module 1 to collect participating objects related to the animation of the target page, but the present application does not limit the specific class name and function name in this process.
[0126] In a possible implementation, the instruction 11 may also include an identifier of the target page, and the transition control module may collect participating objects related to the animation of the target page based on the identifier of the target page, but the present application does not limit this.
[0127] S403: Transition module 1 sends instruction 12 to transition module 2, where instruction 12 is used to indicate that participating objects related to the dynamic effect of the target page are ready.
[0128] Optionally, transition module 1 may send instruction 12 to transition module 2 by calling the OnTransitionReady() function under the Transitions class to indicate that participating objects related to the animation of the target page are ready, but the present application does not limit the specific class names and function names in this process.
[0129] S404 , the transition module 2 distributes participating objects related to the dynamic effect of the target page based on the instruction 12 .
[0130] It should be understood that the transition module 2 distributes the participating objects related to the animation of the target page, which can be understood as the transition module 2 arranging the playback order of the participating objects related to the animation of the target page according to the animation of the target page so that the playback effect can meet the expected effect.
[0131] After the above S404, the transition module 2 further executes S405.
[0132] S405. Transition module 2 obtains information 1 from the target Activity. Information 1 includes window variables associated with the target page and the animation type of the target page.
[0133] It should be understood that the window variable associated with the target page can be used to indicate whether the snapshot of the page displayed when the target application exits to the background (such as the C page described above) has been transferred. When the target application is hot-started, whether the relevant animation of the page displayed when the target application exits to the background is directly triggered, or the animation of the transition page before the page is triggered and then the relevant animation of the page is triggered, in order to show the user the screen displayed when the target application exits to the background as soon as possible, the snapshot of the page displayed when the target application exits to the background will be mounted (that is, the snapshot of the page displayed when the target application exits to the background can participate in the animation as the top layer), so as to visually improve the application startup speed and give users a better user experience. In the process described in the above method 300, since page A is set for transition before page B, in the open animation of page A, page C is mounted under page A. When the open animation of page A is played, page C is played first. After page A is loaded, page C is removed and the electronic device displays page A. In the close animation of page A, page C is mounted under page B. When the close animation of page A is played, page C is also played first. After page B is loaded, page C is destroyed and page B is displayed. If there are animations of other pages before the animation of the target page is played, page C will be transferred in the process of playing the animations one by one. By judging whether this page (such as page C) is transferred, it can be determined whether the animations of other pages have been played before the current active animation (which can be expressed as Active Transition, which can be understood as the animation of the target page) is played.
[0134] Optionally, the window variable may be indicated by a Boolean value. For example, if the value is true, it can be considered that page C has been transferred. If the value is false, it can be considered that page C has not been transferred. However, this application does not make any specific limitation to this.
[0135] Optionally, the animation type may be zooming, transparency change, translation, or flying in and out, etc., which is not limited in this application.
[0136] S406. Transition module 2 determines whether the window variable associated with the target page is the target value 1 and whether the animation type of the target page is the target value 2. When the window variable associated with the target page is the target value 1 and the animation type of the target page is the target value 2, transition module 2 executes S407; when the window variable associated with the target page is not the target value 1 and / or the animation type of the target page is not the target value 2, transition module 2 executes S408.
[0137] In some implementations, the window variables associated with the target page may be marked by the window module after detecting a change in the mounted body of the C page. The window module may be, for example, a window management service (WindowManagerService), and the window variables associated with the target page may be global shared variables.
[0138] Optionally, target value 1 may be, for example, true, and target value 2 may be, for example, a value that can identify an animation type such as transparency change, translation, or flying in and out. This application does not make any specific limitations on this. In some implementations, an animation type such as transparency change, translation, or flying in and out corresponds to a close animation, and target value 2 may be, for example, TRANSIT_CLOSE.
[0139] In addition, the researchers also found that in some implementations, when the target page's animation is running in the system process, if the animation of other pages is set before the target page's animation, and the animation type of the page is a type that will expose other participating objects of the animation during the animation playback process, then the technical problem presented by the above method 300 will also occur. Therefore, in some implementations, the transition module 2 can also obtain information 2 from the target Activity, and the information 2 can include the system property value (SystemProperties) corresponding to the target page, and the system property value corresponding to the target page can be the same as indicating whether the animation of the target page is running in the system process.
[0140] Optionally, the system property value corresponding to the target page can also be indicated by a Boolean value. For example, when the system property value corresponding to the target page is true (true), it can indicate that the target page's animation is running in the system process. When the system property value corresponding to the target page is false (false), it can indicate that the target page's animation is not running in the system process. In some implementations, when the system property value corresponding to the target page is false (false), the target page's animation can run in the desktop (Launcher) process, but this application does not limit this.
[0141] In some implementations, the transition module 2 may obtain the window variable associated with the target page, the animation type of the target page, and the system property value corresponding to the target page from the target Activity based on the identifier of the target page.
[0142] Furthermore, before the above S406, the transition module 2 may also determine whether the system attribute value corresponding to the target page is the target value 3, and continue to execute S406 and subsequent steps if the system attribute value corresponding to the target page is the target value 3, and if the system attribute value corresponding to the target page is not the target value 3, the transition module 2 may continue to execute S408. Optionally, the target value 3 may be true.
[0143] S407, transition module 2 terminates the animation of the target page and directly delivers the target page.
[0144] Optionally, the transition module 2 may terminate the animation of the target page by calling the onAbort() function and directly play the target page. This method is helpful in avoiding the screen flashing problem caused by the animation playing and is helpful in improving the user experience.
[0145] Furthermore, the transition module 2 can also release the motion effect resources by calling the releaseSurfaces() function to save the memory of the electronic device.
[0146] In a possible implementation, after the transition module 2 dispatches the target page, the Activity Manager Service (AMS) module detects that the target page is ready in the next refresh cycle, and then sends the target page for display through the display synthesis process.
[0147] S408 , the transition module 2 sends an instruction 13 to the transition processing module, where the instruction 13 is used to instruct the transition processing module to play the dynamic effect of the target page according to the object distributed by the transition module 2 .
[0148] It should be understood that the meanings of the activity startup module, transition control module, transition processing module, transition module 1, transition module 2, activity recording module and activity management service module involved in method 400 may be similar to those described in the above method 300, and will not be repeated here.
[0149] It should be noted that the module names involved in the embodiments of the present application can be defined as other names as long as the functions of each module can be achieved, and there is no specific restriction on the names of the modules.
[0150] Figure 5 An application startup method 500 provided in an embodiment of the present application is exemplarily shown. The method 500 can be applied to an electronic device. The software structure of the electronic device can be as follows: Figure 2 As shown, the hardware structure can be as follows Figure 6 As shown, but this application is not limited to this.
[0151] The method 500 comprises the following steps:
[0152] S501: In response to an operation of starting a first application, trigger an animation of a target page included in the first application.
[0153] S502. When the animation of the target page satisfies the first condition, the animation of the target page is terminated and the target page is displayed; wherein the first condition is used to indicate that there are animations of other pages before the animation of the target page, and the animation type of the target page belongs to the type of other participating objects that will reveal the animation of the target page during the animation playback process.
[0154] It should be understood that the first application may have a similar meaning to the target application described in the above method 300 and method 400, and the target page may be any page in the process of starting the first application, which is not specifically limited in the present application.
[0155] In the embodiment of the present application, when the target page's animation effect triggered when the first application is started meets the first condition, the target page's animation effect is terminated (that is, the animation effect is not displayed), and the target page is directly displayed, wherein the first condition is used to indicate that there are animation effects of other pages before the target page's animation effect, and the target page's animation effect type belongs to the type of other participating objects that will be exposed during the animation effect playback process. This method is conducive to avoiding the screen flashing phenomenon caused by the exposure of other pages participating in the target page's animation effect during the target page's animation effect playback process when the animation effects of other pages and the target page's animation effects are played one by one.
[0156] Optionally, the target page may generally refer to page A, page B, or any page between page A and page B described in the above methods 300 and 400, and the present application does not make any specific limitation on this.
[0157] Optionally, the objects participating in the animation of the target page may include the target page and other objects. The other objects may be, for example, the wallpaper mentioned above, but the present application does not limit this.
[0158] In a possible implementation, starting the first application in the above method 500 may be a cold start of the first application. During the cold start of the first application, if there is an animation of the target page that meets the first condition, the above method 500 may also be used to avoid the screen flashing phenomenon that may occur during this process.
[0159] In another possible implementation, launching the first application in the above method 500 may refer to hot launching the first application, and method 500 further includes: at a first moment, in response to an operation of launching the first application, launching the first application; at a second moment after the first moment, in response to an operation of exiting the first application, switching the first application to background operation; in response to the operation of launching the first application, triggering the animation of the target page associated with the first application, including: at a third moment after the second moment, in response to the operation of launching the first application, triggering the animation of the target page included in the first application, and between the second moment and the third moment, the background program of the first application is not cleaned up.
[0160] In the scenario of hot starting the first application, in a possible implementation, the objects participating in the animation of the target page and the objects participating in the animation of other pages all include the first page, and the first page is played first when the animation of the target page and the animation of other pages are played. The first page is a snapshot of the page corresponding to the first application switching to the background. In this way, when the user starts the first application at the third moment, the snapshot corresponding to the first application switching to the background, that is, the first page, can be quickly displayed, which visually improves the startup speed of the first application and helps improve the user experience.
[0161] In addition, the researchers of this application also found that in some implementations, when the target page's animation is running in the system process, there are animations of other pages before the target page's animation, and the target page's animation type belongs to the type of other participating objects that will reveal the target page's animation during the animation playback process, the technical problems raised by this application will also arise. Therefore, as an optional embodiment, when the target page's animation satisfies the first condition, the target page's animation is terminated, including: when the target page's animation satisfies the second condition and the first condition, the target page's animation is terminated, and the second condition is used to indicate that the target page's animation is running in the system process.
[0162] In this way, the situation of terminating the animation effect of the target page can be determined more accurately, which is conducive to improving the accuracy of the implementation of the plan and further improving the user experience.
[0163] In some implementations, the animation of the target page runs in the system process, which can also be understood as the animation of the target page being a system-side animation product of the electronic device.
[0164] As an optional embodiment, the first condition includes: the window variable of the target page is a first value and the animation type of the target page is a first type.
[0165] It should be understood that the window variable of the target page here has a similar meaning to the window variable associated with the target page described at S405 in the above method 400, the first value can be the above target value 1, and the first type can be the above target value 2, which will not be repeated here.
[0166] As an optional embodiment, the first type is a transparency change type or a translation type.
[0167] As an optional embodiment, it is applied to an electronic device, and the electronic device includes a first transition module; when the animation of the target page meets the first condition, the animation of the target page is terminated, including: the first transition module responds to the triggering of the animation of the target page, calls the first function, obtains the first information, and the first information includes the window variable of the target page and the animation type of the target page; when the first transition module determines that the window variable of the target page is the first value and the animation type of the target page is the first type, the second function is called to terminate the animation of the target page. In this way, it is helpful to avoid the screen flashing phenomenon caused by the exposure of other objects participating in the animation of the target page during the playback of the animation of the target page when the animations of other pages before the animation of the target page and the animation of the target page are played one by one.
[0168] The first transition module may have a similar meaning to the transition module 2 described in the above method 300 and method 400 , and the first information may have a similar meaning to the information 1 described in the above method 400 .
[0169] Optionally, the first function may be a TransitionInfo() function, and the second function may be an Abort() function, but this application does not limit this.
[0170] As an optional embodiment, after the dynamic effect of the target page is terminated, the method further includes: the first transition module calls a third function to release the dynamic effect resource of the target page. This is conducive to saving memory of the electronic device.
[0171] As an optional embodiment, the second condition includes: the system attribute value of the target page is a second value.
[0172] It should be understood that the system attribute value of the target page described here has a similar meaning to the system attribute corresponding to the target page described in the above method 400, and the second value may also have a similar meaning to the above target value 3.
[0173] As an optional embodiment, it is applied to an electronic device, and the electronic device includes a first transition module; when the animation of the target page satisfies the second condition and the first condition, the animation of the target page is terminated, including: the first transition module calls the first function in response to the triggering of the animation of the target page to obtain the second information, and the second information includes the system attribute value of the target page, the window variable of the target page and the animation type of the target page; the first transition module calls the second function to terminate the animation of the target page when it is determined that the system attribute value of the target page is the second value, the window variable of the target page is the first value, and the animation type of the target page is the first type. In this way, it is helpful to avoid the screen flashing phenomenon caused by the exposure of other objects participating in the animation of the target page during the playback of the animation of the target page when the animations of other pages before the animation of the target page and the animation of the target page are played one by one.
[0174] It should be understood that the second information may include information 1 and information 2 described in method 400 above.
[0175] The application startup method of the embodiment of the present application has been described above, and the device for executing the above method provided by the embodiment of the present application is described below. Those skilled in the art can understand that the method and the device can be combined and referenced with each other, and the relevant device provided by the embodiment of the present application can execute the steps in the above method.
[0176] Figure 6 FIG. 1 is a schematic diagram showing the hardware structure of an electronic device provided in an embodiment of the present application. Figure 6 As shown, the electronic device may include a processor 610 , a memory 620 , a display screen 630 , a sensor module 640 , a universal serial bus (USB) interface 650 , a charging management module 660 , a power management module 661 , a battery 662 , and the like.
[0177] The processor 610 may include one or more processing units, for example, the processor 610 may include a central processing unit (CPU), an application processor (AP), a modem processor, a graphics processing unit (GPU), an image signal processor (ISP), a controller, a video codec, a digital signal processor (DSP), a baseband processor, and / or a neural-network processing unit (NPU), etc. Different processing units may be independent devices or integrated into one or more processors.
[0178] The memory 620 can be used to store computer executable program codes, and the executable program codes include instructions, such as the program codes corresponding to the above methods in the embodiments of the present application.
[0179] The display screen 630 is used to display images, videos, etc. The display screen 630 includes a display panel. In some embodiments, the electronic device may include 1 or N display screens 630, where N is a positive integer greater than 1. The electronic device implements the display function through a GPU, a display screen 630, and an application processor. For example, in an embodiment of the present application, the display screen can be used to display the animation of each page involved in the application startup process.
[0180] It should be noted that the module names involved in the embodiments of the present application can be defined as other names as long as the functions of each module can be achieved, and there is no specific restriction on the names of the modules.
[0181] The application startup method provided in the embodiment of the present application can be applied to an electronic device with a motion effect processing function. The software structure of the electronic device can be as follows: Figure 2 As shown in the figure, the hardware structure can be as follows Figure 6 As shown in , the specific form of the electronic device can refer to the above description and will not be repeated here.
[0182] Figure 7 The schematic diagram of the structure of a chip provided by the embodiment is exemplarily shown. The chip 700 includes one or more (including two) processors 701 , a communication line 702 , a communication interface 703 and a memory 704 .
[0183] In some implementations, the memory 704 stores the following elements: executable modules or data structures, or a subset thereof, or an extended set thereof.
[0184] The method described in the above embodiment of the present application can be applied to the processor 701, or implemented by the processor 701. The processor 701 may be an integrated circuit chip with signal processing capabilities. In the implementation process, each step of the above method can be completed by an integrated logic circuit of hardware in the processor 701 or an instruction in the form of software. The above processor 701 can be a general-purpose processor (for example, a microprocessor or a conventional processor), a digital signal processor (digital signal processing, DSP), an application specific integrated circuit (application specific integrated circuit, ASIC), a field-programmable gate array (field-programmable gate array, FPGA) or other programmable logic devices, discrete gates, transistor logic devices or discrete hardware components. The processor 701 can implement or execute the methods, steps and logic block diagrams related to each processing disclosed in the embodiment of the present application.
[0185] The steps of the method disclosed in the embodiment of the present application can be directly embodied as being executed by a hardware decoding processor, or can be executed by a combination of hardware and software modules in the decoding processor. Among them, the software module can be located in a mature storage medium in the field such as a random access memory, a read-only memory, a programmable read-only memory, or an electrically erasable programmable read only memory (EEPROM). The storage medium is located in the memory 704, and the processor 701 reads the information in the memory 704 and completes the steps of the above method in combination with its hardware.
[0186] The processor 701 , the memory 704 , and the communication interface 703 may communicate with each other via the communication line 702 .
[0187] In the above embodiments, the instructions stored in the memory for execution by the processor may be implemented in the form of a computer program product, wherein the computer program product may be pre-written in the memory, or may be downloaded and installed in the memory in the form of software.
[0188] In the embodiment of the present application, the chip 700 may also be a chip system, such as a system on chip (SOC), which is not limited in the present application.
[0189] An embodiment of the present application provides an electronic device, which includes: one or more processors and a memory; the memory is coupled to the one or more processors, the memory stores computer program code, and the computer program code includes computer instructions; the one or more processors call the computer instructions to enable the electronic device to execute the method in the above embodiment.
[0190] The embodiment of the present application provides a chip or a chip system. The chip or chip system is applied to an electronic device, and the chip or chip system includes one or more processors, and the one or more processors are used to call computer instructions to enable the electronic device to execute the method in the above embodiment. Its implementation principle and technical effect are similar to those of the above-mentioned related embodiments, and will not be repeated here.
[0191] The embodiment of the present application also provides a computer-readable storage medium. The computer-readable storage medium includes computer instructions. When the computer instructions are run on an electronic device, the electronic device executes the method in the above embodiment. The method described in the above embodiment can be implemented in whole or in part by software, hardware, firmware, or any combination thereof. If implemented in software, the function can be stored as one or more instructions or codes on a computer-readable medium or transmitted on a computer-readable medium. Computer-readable media can include computer storage media and communication media, and can also include any medium that can transfer a computer program from one place to another. The storage medium can be any target medium that can be accessed by a computer.
[0192] In one possible implementation, a computer readable medium may include RAM, ROM, compact disc read-only memory (CD-ROM) or other optical disk storage, magnetic disk storage or other magnetic storage devices, or any other medium that is intended to carry or store the desired program code in the form of instructions or data structures and can be accessed by a computer. Moreover, any connection is appropriately referred to as a computer readable medium. For example, if the software is transmitted from a website, server or other remote source using a coaxial cable, fiber optic cable, twisted pair, digital subscriber line (DSL) or wireless technology (such as infrared, radio and microwave), the coaxial cable, fiber optic cable, twisted pair, DSL or wireless technology such as infrared, radio and microwave are included in the definition of medium. Disks and optical disks as used herein include optical disks, laser disks, optical disks, digital versatile discs (DVD), floppy disks and Blu-ray discs, where disks usually reproduce data magnetically, while optical disks reproduce data optically using lasers. Combinations of the above should also be included in the scope of computer readable media.
[0193] An embodiment of the present application provides a computer program product, which includes a computer program code. When the computer program code runs on an electronic device, the electronic device executes the method in the above embodiment.
[0194] The embodiments of the present application are described with reference to the flowcharts and / or block diagrams of the methods, devices (systems), and computer program products according to the embodiments of the present application. It should be understood that each process and / or box in the flowchart and / or block diagram, as well as the combination of the processes and / or boxes in the flowchart and / or block diagram, can be implemented by computer program instructions. These computer program instructions can be provided to a processing unit of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable device to generate a machine, so that the instructions executed by the processing unit of the computer or other programmable data processing device generate instructions for implementing the processes in the flowchart and / or block diagram. Figure 1 A process or multiple processes and / or boxes Figure 1 A device that provides the functions specified in a block or multiple blocks.
[0195] The above specific implementation methods further illustrate the purpose, technical solutions and beneficial effects of the present invention in detail. It should be understood that the above are only specific implementation methods of the present invention and are not intended to limit the scope of protection of the present invention. Any modifications, equivalent substitutions, improvements, etc. made on the basis of the technical solutions of the present invention should be included in the scope of protection of the present invention.
Claims
1. A method for starting an application, characterized in that: include: In response to the operation of starting the first application, triggering the animation of the target page included in the first application; When the animation of the target page satisfies a first condition, the animation of the target page is terminated and the target page is displayed; wherein the first condition includes a window variable of the target page and an animation type of the target page, and the first condition is used to indicate that there are animations of other pages before the animation of the target page, and the animation type of the target page belongs to the type of other participating objects that will reveal the animation of the target page during the animation playback process; When the dynamic effect of the target page satisfies the first condition, terminating the dynamic effect of the target page includes: When the animation of the target page satisfies a second condition and the first condition, terminating the animation of the target page, wherein the second condition is used to indicate that the animation of the target page is running in a system process, and the second condition includes a system attribute value of the target page; The method is applied to an electronic device, wherein the electronic device comprises a first transition module; When the dynamic effect of the target page satisfies the second condition and the first condition, terminating the dynamic effect of the target page includes: The first transition module, in response to triggering the dynamic effect of the target page, calls a first function to obtain second information, where the second information includes a system property value of the target page, a window variable of the target page, and a dynamic effect type of the target page; The first transition module calls a second function to terminate the animation of the target page when it is determined that the system property value of the target page is the second value, the window variable of the target page is the first value, and the animation type of the target page is the first type.
2. The method according to claim 1, characterized in that Before triggering the animation of the target page included in the first application in response to the operation of starting the first application, the method further includes: At a first moment, in response to an operation of starting the first application, starting the first application; At a second moment after the first moment, in response to an operation of exiting the first application, switching the first application to background operation; The triggering of the animation of the target page included in the first application in response to the operation of starting the first application includes: At a third moment after the second moment, in response to the operation of starting the first application, the animation of the target page included in the first application is triggered, and between the second moment and the third moment, the background program of the first application is not cleaned up.
3. The method according to claim 2, characterized in that The participating objects of the animation of the target page and the participating objects of the animation of the other pages both include a first page, and the first page is played first when the animation of the target page and the animation of the other pages are played. The first page is a snapshot of the corresponding page when the first application switches to background operation.
4. The method according to claim 1, characterized in that: The first condition includes: The window variable of the target page is a first value and the animation type of the target page is a first type.
5. The method according to claim 4, characterized in that The first type is a transparency change type or a translation type.
6. The method according to claim 5, characterized in that After terminating the animation of the target page, the method further includes: The first transition module calls a third function to release the dynamic effect resources of the target page.
7. The method according to claim 4, characterized in that The second condition includes: the system attribute value of the target page is a second value.
8. An electronic device, characterized in that: The electronic device comprises: one or more processors and a memory; the memory is coupled to the one or more processors, the memory is used to store computer program code, the computer program code comprises computer instructions, and the one or more processors call the computer instructions so that the electronic device executes the method as described in any one of claims 1 to 7.
9. A chip system, characterized in that: The chip system is applied to an electronic device, and the chip system includes one or more processors, and the one or more processors are used to call computer instructions so that the electronic device executes the method as described in any one of claims 1 to 7.
10. A computer-readable storage medium, characterized in that: The computer-readable storage medium comprises computer instructions, and when the computer instructions are executed on an electronic device, the electronic device executes the method as claimed in any one of claims 1 to 7.
11. A computer program product, characterized in that The computer program product comprises a computer program code, and when the computer program code is run on an electronic device, the electronic device is caused to perform the method according to any one of claims 1 to 7.
Citation Information
Patent Citations
Application program starting animation playing method and electronic equipment
CN117724781A