Application switching method and electronic device
By responding to the user's touch operation on the second application during the startup animation of the first application, ending the startup animation of the first application and playing a transition animation, the problem of cumbersome application switching steps in the prior art is solved, and efficient and smooth application switching is achieved.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- HONOR DEVICE CO LTD
- Filing Date
- 2024-08-29
- Publication Date
- 2026-06-09
Smart Images

Figure CN120803318B_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of terminal and communication technology, and in particular to an application switching method and an electronic device. Background Technology
[0002] With the widespread adoption of smartphones and the abundance of applications, users are switching between apps more and more frequently. Quick and smooth switching between different applications has become a crucial factor in enhancing user experience. In mobile operating systems, implementing an efficient application switching mechanism has become a key focus for system designers.
[0003] Currently, common methods for switching applications include switching via the desktop and using a multitasking manager. With desktop switching, users need to exit the current application and return to the desktop, then click the target application's icon to launch it. When using a multitasking manager, users need to bring up the multitasking interface and select the target application from the list of recently used applications. Both methods require users to perform multiple steps to complete the switching process, prolonging the switching time and impacting the smoothness of the user experience. Summary of the Invention
[0004] This application provides an application switching method and an electronic device for improving application switching efficiency.
[0005] In a first aspect, this application provides an application switching method, comprising: in response to an operation of launching a first application on a desktop, playing a first launch animation of the first application in a launch window; during the playback of the first launch animation, in response to a touch operation on the icon position of a second application on the desktop, ending the first launch animation and starting to play a transition animation; and after playing the transition animation, displaying the interactive interface of the second application in full screen.
[0006] By adopting the above technical solution, users can directly trigger the launch of the second application while the first application's launch animation is playing. The electronic device will respond promptly to the user's new intention, ending the launch animation of the first application and smoothly transitioning to the second application through a transition animation. This mechanism avoids the redundant process of waiting for the first application to fully launch before switching, greatly improving the efficiency of application switching.
[0007] In conjunction with some embodiments of the first aspect, in some embodiments, during the playback of the first startup animation of the first application in the startup window, the startup window gradually enlarges; when the second application is a portrait application, the step of ending the first startup animation and starting the transition animation in response to a touch operation on the icon position of the second application on the desktop during the playback of the first startup animation specifically includes: during the playback of the first startup animation, in response to a touch operation on the icon position of the second application outside the coverage area of the startup window on the desktop, the first startup animation continues to play; after the transition animation is prepared, the playback of the first startup animation stops, the window of the last frame of the first startup animation is maintained, the window of the last frame of the first startup animation is gradually moved from inside the screen to outside the screen, the window of the second application is gradually moved from outside the screen to inside the screen in the same direction, and gradually enlarged during the movement until it fills the entire screen.
[0008] By employing the above technical solution, after detecting that the user has triggered the launch of the second application, the launch animation of the first application continues to play until the transition animation is ready, ensuring the continuity of the screen display and avoiding black screens or flickering in the middle. Once the transition animation is complete, the last frame of the first application's window is smoothly moved off-screen, while the window of the second application is gradually brought in from off-screen. This gradual zoom-in process ensures visual coherence and smoothness throughout the switching process. This not only improves the user experience but also reduces the cognitive burden caused by sudden changes.
[0009] In conjunction with some embodiments of the first aspect, in some embodiments, during the playback of the first startup animation of the first application in the startup window, the startup window gradually enlarges; when the second application is a landscape application, the step of ending the first startup animation and starting the transition animation in response to a touch operation on the icon position of the second application on the desktop during the playback of the first startup animation specifically includes: during the playback of the first startup animation, in response to a touch operation on the icon position of the second application outside the coverage area of the startup window on the desktop, the first startup animation continues to play; after the transition animation is ready, the playback of the first startup animation stops, the window of the last frame of the first startup animation is maintained, the window of the last frame of the first startup animation is gradually moved from the top of the screen to outside the screen, and the window of the second application is gradually moved from the bottom of the screen to inside the screen in the same direction, and gradually enlarged during the movement until it fills the entire screen.
[0010] By adopting the above technical solution, when the second application is in landscape mode, the window of the first application is moved out from the top of the screen, while the window of the second application is brought in from the bottom of the screen. Taking into account the special characteristics of landscape applications, the change in application orientation is intuitively displayed through vertical movement. At the same time, the gradual enlargement of the second application window provides a visual buffer for the user, reducing the discomfort that may occur when suddenly switching to landscape mode, and greatly improving the smoothness of switching between applications with different screen orientations and the user experience.
[0011] In conjunction with some embodiments of the first aspect, in some embodiments, the initial size of the window of the second application is the same as the size of the window of the last frame.
[0012] By adopting the above technical solution, the consistency of the initial size of the two windows greatly improves the smoothness and continuity of switching between the two windows, thus enhancing the user's visual experience.
[0013] In conjunction with some embodiments of the first aspect, in some embodiments, during the playback of the first launch animation, responding to a touch operation on the icon location of a second application outside the coverage area of the launch window on the desktop specifically includes: after receiving a click event on the screen at the icon location of the second application, determining whether the click event conforms to an additional click launch scenario based on preset scenario rules; the preset scenario rules include: the click event is during the launch animation, the click coordinates are not covered by the launch window, and the click event is not a gesture hotspot event; if it is determined that the click event conforms to the additional click launch scenario, the click event is transmitted to the icon location of the second application on the desktop, responding to a click operation on the icon of the second application under the additional click launch scenario, the click operation being a type of touch operation.
[0014] By adopting the above technical solution, preset scenario rules are introduced to determine whether a user's click meets the criteria for an additional click-to-launch scenario. These rules include the click event occurring during a launch animation, the click coordinates not being covered by the launch window, and the event not occurring within a gesture hotspot. When these conditions are met, the click event is passed to the second application icon on the desktop, ensuring accurate capture of the user's intent while avoiding erroneous operations caused by accidental touches. Simultaneously, by passing the event to the desktop, existing application launch logic can be reused, improving code reusability and system stability. This enhances the user experience while also optimizing overall system performance.
[0015] In conjunction with some embodiments of the first aspect, in some embodiments, during the playback of the first startup animation, responding to a touch operation on the icon location of the second application outside the coverage area of the startup window on the desktop specifically includes: during the playback of the first startup animation, upon receiving a preset pass-through operation on the icon location of the second application covered by the startup window, determining that the current scenario is an additional click startup scenario, and responding to the startup operation of the second application under the additional click startup scenario, wherein the preset pass-through operation is a touch operation different from the click operation.
[0016] By adopting the above technical solution, a preset pass-through operation is introduced, allowing users to launch the second application even when the launch window of the first application covers the icon of the second application. This greatly increases the flexibility of user operation, allowing users to correct their choices promptly regardless of the stage of the first application's launch animation. Simultaneously, by using specific preset operations (such as knuckle taps, two-finger clicks, etc.), the user's intent can be effectively distinguished, avoiding accidental touches that may occur with ordinary touch operations. This not only improves the system's fault tolerance but also provides users with more diverse interaction methods.
[0017] In conjunction with some embodiments of the first aspect, in some embodiments, the method further includes: during the playback of the first startup animation, listening for input events on the desktop via a swipe-up channel; and, if it is determined that the input event conforms to the additional click startup scenario, triggering a response from the desktop to the input event.
[0018] By employing the above technical solution, the swipe-up channel continuously listens for input events on the desktop, capturing user actions even during the initial application launch animation, thus overcoming the input event loss problem caused by focus shifting in traditional Android systems. When an input event is determined to match an additional click launch scenario, the desktop is triggered to respond to the event, not only improving the system's sensitivity to user actions but also ensuring that no user intent is missed during complex launch processes. By reusing the existing swipe-up channel, modifications to the system architecture are minimized, guaranteeing system stability and compatibility.
[0019] In conjunction with some embodiments of the first aspect, in some embodiments, ending the first startup animation specifically includes: stopping the execution of the first startup animation while retaining the current window state; remounting the startup window layer and desktop layer of the first startup animation to the corresponding layer control interface; and remounting these two layer control interfaces to the default display area.
[0020] By adopting the above technical solution, when the startup animation of the first application ends, the execution of the first startup animation is stopped first, but the current window state is retained, avoiding sudden screen changes. Then, the startup window layer and desktop layer are remounted to the corresponding layer control interfaces, and these interfaces are remounted to the default display area. This fine-grained layer management not only ensures a smooth screen transition but also lays the operational foundation for subsequent transition effects. In this way, seamless switching between different applications can be achieved, greatly improving the user's visual experience and operational smoothness.
[0021] In conjunction with some embodiments of the first aspect, in some embodiments, the method further includes: when the first startup animation ends, obtaining the size of the last frame startup window; determining the ratio of the size of the last frame startup window to the screen size; and determining the ratio as a parameter value for running the transition animation.
[0022] By adopting the above technical solution, it is ensured that the transition animation seamlessly connects from the last state of the first application's startup animation, avoiding abrupt size changes. Using this dynamically calculated parameter, it can adapt to different sizes of startup windows, allowing the transition animation to maintain visual continuity in various situations. This not only improves the smoothness of the switching process but also enhances the consistency of the entire interaction process, providing users with a more comfortable and natural user experience.
[0023] In conjunction with some embodiments of the first aspect, in some embodiments, the method further includes: disabling the default background setting before playing the transition effect; and setting the current desktop wallpaper as the background layer of the transition effect.
[0024] By adopting the above technical solution, abrupt background changes during application switching are avoided. Using a familiar desktop wallpaper as the background creates visual continuity between different applications. This not only reduces visual interference for the user but also makes the entire switching process more natural and smooth.
[0025] In some embodiments, in conjunction with the first aspect, the method further includes: resetting the scene to the default value and clearing the animation parameters after the transition animation is completed.
[0026] By adopting the above technical solution, the scene is reset to its default value, ensuring that subsequent operations are not affected by this transition. Secondly, the animation parameters are cleared, releasing related resources. Through timely cleanup and reset, the system can always maintain a stable and predictable state, preparing for the next operation and significantly improving system stability and response speed.
[0027] In conjunction with some embodiments of the first aspect, in some embodiments, ending the first startup animation and starting to play a transition animation specifically includes: ending the first startup animation and directly playing the second startup animation of the second application as the transition animation.
[0028] By adopting the above technical solution, the transition process is simplified, the number of intermediate state switching is reduced, and the overall switching speed is accelerated. At the same time, because the native startup animation of the second application is used, users can obtain the same visual experience as directly launching the application, maintaining consistency in interaction. This not only optimizes the use of system resources and reduces the need for additional animation rendering, but also allows users to enter the target application's interface more quickly.
[0029] In a second aspect, embodiments of this application provide an electronic device comprising: one or more processors and a memory; the memory is coupled to the one or more processors and is used to store computer program code, the computer program code including computer instructions, wherein the one or more processors invoke the computer instructions to cause the electronic device to perform the method described in the first aspect and any possible implementation thereof.
[0030] Thirdly, embodiments of this application provide a computer program product containing instructions that, when run on an electronic device, cause the electronic device to perform the method described in the first aspect and any possible implementation thereof.
[0031] Fourthly, embodiments of this application provide a computer-readable storage medium including instructions that, when executed on an electronic device, cause the electronic device to perform the method described in the first aspect and any possible implementation thereof.
[0032] It is understood that the electronic device provided in the second aspect, the computer program product provided in the third aspect, and the computer storage medium provided in the fourth aspect are all used to execute the methods provided in the embodiments of this application. Therefore, the beneficial effects they can achieve can be referred to the beneficial effects in the corresponding methods, and will not be repeated here. Attached Figure Description
[0033] Figures 1A-1B This is a schematic diagram illustrating a set of application switching scenarios in related technologies;
[0034] Figure 2 A schematic diagram of an exemplary scenario for the application switching method provided in the embodiments of this application;
[0035] Figure 3 This is another exemplary scenario diagram illustrating the application switching method provided in the embodiments of this application;
[0036] Figure 4A This is another exemplary scenario diagram illustrating the application switching method provided in the embodiments of this application;
[0037] Figure 4B This is another exemplary scenario diagram illustrating the application switching method provided in the embodiments of this application;
[0038] Figures 5A-5B This is another set of exemplary scenario diagrams illustrating the application switching method provided in the embodiments of this application;
[0039] Figure 6 This is another exemplary scenario diagram illustrating the application switching method provided in the embodiments of this application;
[0040] Figure 7 This is another exemplary scenario diagram illustrating the application switching method provided in the embodiments of this application;
[0041] Figure 8 This is a flowchart illustrating the application of the switching method in an embodiment of this application;
[0042] Figure 9 This is a schematic block diagram of the software structure of the electronic device 100 according to an embodiment of this application;
[0043] Figure 10 This is a schematic diagram of a workflow for application switching in an embodiment of this application;
[0044] Figures 11A-11B This is a set of exemplary information interaction diagrams illustrating the application of the switching method in the embodiments of this application;
[0045] Figure 12 This is an exemplary information interaction diagram between components in the application switching method of this application embodiment;
[0046] Figure 13 This is a schematic diagram of the structure of the electronic device 100 provided in the embodiments of this application. Detailed Implementation
[0047] The terminology used in the following embodiments of this application is for the purpose of describing particular embodiments only and is not intended to be limiting of this application. As used in the specification and appended claims of this application, the singular expressions “a,” “an,” “the,” “the,” “the,” and “this” are intended to include the plural expressions as well, unless the context clearly indicates otherwise. It should also be understood that the term “and / or” as used in this application refers to and includes any or all possible combinations of one or more of the listed items.
[0048] Hereinafter, the terms "first" and "second" are used for descriptive purposes only and should not be construed as implying or suggesting relative importance or implicitly indicating the number of indicated technical features. Thus, a feature defined as "first" or "second" may explicitly or implicitly include one or more of that feature, and in the description of the embodiments of this application, unless otherwise stated, "multiple" means two or more.
[0049] To facilitate understanding, the relevant terms and concepts involved in the embodiments of this application will be introduced below.
[0050] (1) Start-up animation:
[0051] Launch animations are a series of visual effects displayed by the system in a mobile device's operating system to provide visual feedback when a user launches an application. These animations typically appear during the application loading process and are designed to enhance the user experience and mask the actual loading time of the application.
[0052] Launch animations typically consist of a series of carefully designed animation sequences, which may involve elements such as changes in the application icon's shape, color, or position. These animations not only attract the user's attention but also convey the message that the application is loading, reducing user anxiety while waiting. Launch animations usually play in a separate launch window that covers part or all of the screen until the application is fully loaded and ready.
[0053] (2) Transition animation effects:
[0054] Transition effects are animations that appear in a user interface when switching from one scene or state to another. This type of animation design aims to provide visual continuity for the user, making interface changes smoother and more natural, while conveying information about the state change. In mobile applications, transition effects are commonly used for scenarios such as switching between applications, page navigation, or content updates.
[0055] Transition animations typically consist of a series of carefully designed animation elements, potentially involving combinations of basic visual effects such as fade-in / fade-out, scaling, rotation, and translation. These animations not only attract the user's attention and guide their visual focus but also provide intuitive cues about the direction and nature of interface changes. Effective transition animations can reduce the user's cognitive load, enhance the smoothness of operations, and thus improve the overall user experience.
[0056] like Figures 1A-1B The image shows a schematic diagram of a set of application switching scenarios in related technologies.
[0057] In such Figure 1AOn the desktop of the electronic device shown in (a), in response to the user clicking the icon of application A, the electronic device begins to play the startup animation of application A, displaying as shown in the image. Figure 1A The user interface shown in (b) is shown in the image.
[0058] As the window of application A gradually enlarges during its launch animation, the user discovers that application A is not the application they intended to open; application B is. Therefore, as... Figure 1A As shown in (b), the user clicks the icon of application B on the desktop, which has not yet been covered by the effect window. However, the electronic device does not respond to the operation and continues to display as shown in the image. Figure 1A The user interface shown in (c) continues the startup animation of application A.
[0059] After the startup animation of application A ends, such as Figure 1A As shown in (d), the interface of application A will be displayed. However, application A is not the application the user wants to open; therefore, the user needs to close application A and then open application B. In response to the user's swipe up on the hotspot at the bottom of the user interface, the electronic device displays as shown... Figure 1B The desktop shown in (a) is shown in the image.
[0060] like Figure 1B As shown in (b), in response to the user clicking the icon of application B on the desktop, the electronic device begins playing the startup animation of application B. Figure 1B As shown in (c), the animation window continuously increases as the startup animation continues to run. After the startup animation of application B ends, as shown in (c), the window continues to increase. Figure 1B As shown in (d) in the diagram, the display interface of application B is finally displayed.
[0061] It is evident that in related technologies, switching to launch another application while starting one application is not only cumbersome but also time-consuming.
[0062] The application switching method provided in this application embodiment can quickly switch to another application that the user wants to open, even during the startup process of one application, which can greatly improve the efficiency of application switching.
[0063] like Figure 2 The diagram shown is an exemplary scenario of the application switching method provided in this application embodiment.
[0064] In such Figure 2 On the desktop of the electronic device shown in (a), in response to the user clicking the icon of application A, the electronic device begins to play the startup animation of application A, displaying as shown in the image. Figure 2 The user interface shown in (b) is shown in the image.
[0065] As the window of application A gradually enlarges following its launch animation, the user discovers that application A is not the application they intended to open; application B is. In response to the user's request... Figure 2 In (b), the click operation of the icon of application B on the desktop that has not yet been covered by the effect window, such as... Figure 2 As shown in (c), the electronic device plays a transition effect that switches to application B. And after the transition effect ends, as shown... Figure 2 As shown in (d), the display interface of application B is displayed directly.
[0066] Compared to related technologies, the application switching method in this application allows users to switch to application B during the startup process of application A simply by clicking the icon of application B. Even while application A is launching, the electronic device can directly respond to the click and launch application B. This eliminates the need for cumbersome switching operations and saves time spent switching to application B, significantly improving the efficiency of application switching.
[0067] Figure 2 The example shown is just a simple illustration. In real-world applications, there are many different specific solutions for each stage of application switching based on actual needs or settings, and no limitations are specified here.
[0068] In some embodiments, during the startup process of application A, even if the icon of application C is covered by the animated window of application A, the electronic device can still launch application C in response to user operation.
[0069] Please see Figure 3 This is another exemplary scenario diagram of the application switching method provided in the embodiments of this application.
[0070] In such Figure 3 On the desktop of the electronic device shown in (a), in response to the user clicking the icon of application A, the electronic device begins to play the startup animation of application A, displaying as shown in the image. Figure 3 The user interface shown in (b) is shown in the image.
[0071] As the launch animation window of application A gradually enlarges, the user realizes that application A is not the application they wanted to open; application C is. Although application C is now obscured by the launch animation window of application A, the user remembers the location of application C's icon on the desktop.
[0072] When a user performs a preset pass-through action (e.g., knuckle tap, two-finger tap, single-finger tap, etc.) on the corresponding position of the icon of application C within the window displaying the launch animation of application A, the system responds to this preset pass-through action as follows: Figure 3As shown in (c), the electronic device can play a transition effect that switches to application C. After the transition effect ends, as... Figure 3 As shown in (d), the display interface of application C is shown.
[0073] In some embodiments, the transition animation displayed on the electronic device after responding to a user's click on the icon of application B can also be displayed in many different ways, switching to application B.
[0074] Please see Figure 4A This is another exemplary scenario diagram of the application switching method provided in the embodiments of this application.
[0075] In such Figure 4A On the desktop of the electronic device shown in (a), in response to the user clicking the icon of application A, the electronic device begins to play the startup animation of application A, displaying as shown in the image. Figure 4A The user interface shown in (b) is shown in the image.
[0076] As the window of application A gradually enlarges following its launch animation, the user discovers that application A is not the application they intended to open; application B is. In response to the user's request... Figure 4A In (b), the click operation of the icon of application B on the desktop that has not yet been covered by the effect window, such as... Figure 4A As shown in (c), the electronic device can display a notification window on the startup animation window of application A, displaying a message indicating that application B is starting up. This notification window can also display a countdown timer for application B to complete startup. After preparing the display interface of application B in the background, it can be directly launched as shown in (c). Figure 4A As shown in (d), the display interface of application B is shown.
[0077] Please see Figure 4B This is another exemplary scenario diagram of the application switching method provided in the embodiments of this application.
[0078] In such Figure 4B On the desktop of the electronic device shown in (a), in response to the user clicking the icon of application A, the electronic device begins to play the startup animation of application A, displaying as shown in the image. Figure 4B The user interface shown in (b) is shown in the image.
[0079] As the window of application A gradually enlarges following its launch animation, the user discovers that application A is not the application they intended to open; application B is. In response to the user's request... Figure 4B In (b), the click operation of the icon of application B on the desktop that has not yet been covered by the effect window, such as... Figure 4BAs shown in (c), the electronic device can directly end the startup animation of application A and start playing the startup animation of application B as a transition effect. After the startup animation of application B ends, as shown in (c), the electronic device can start playing the startup animation of application B as a transition effect. Figure 4B As shown in (d), the display interface of application B is shown.
[0080] Preferably, in some embodiments, the transition animation when switching to application B can be performed by smoothly transitioning the window of application B to the window of application A.
[0081] Please see Figures 5A-5B This is another set of exemplary scenario diagrams illustrating the application switching method provided in the embodiments of this application.
[0082] In such Figure 5A In the example shown in (a), on the desktop of the electronic device, in response to the user clicking the icon of application A, the electronic device begins playing the startup animation of application A. Figure 5A As shown in (b) to (c), the animation window gradually enlarges.
[0083] As the window of application A gradually enlarges following its launch animation, the user discovers that application A is not the application they intended to open; application B is. In response to the user's request... Figure 5A In (c), before the icon of application B on the desktop is covered by the effect window, a click operation occurs. The electronic device pulls up application B and prepares to switch to the transition effect of application B. Before the transition effect is complete, such as... Figure 5A As shown in (d), the startup animation of application A continues to play, and the animation window continues to enlarge.
[0084] After the transition animation is ready, the electronic device will end the startup animation of application A, and retain the window of the last frame of the startup animation of application A. For example... Figure 5B As shown in (a), the transition effect begins to play, and the startup animation window of application A gradually moves from inside the screen to outside the screen, while the window of application B gradually moves from outside the screen to inside the screen.
[0085] like Figure 5B As shown in (b), the transition effect continues to play, with window B panning and zooming in simultaneously. This continues until the transition effect ends, as shown in [image / description]. Figure 5B As shown in (c), the electronic device displays the application B window in full screen, and the window displays the display interface of application B.
[0086] Understandably, when switching to application B's transition animation begins, the proportion of the screen size occupied by the window in the last frame of application A's startup animation may differ. Therefore, the size of application B's window at the start of the transition animation and the rate at which the window grows during the transition animation can differ accordingly.
[0087] Please see Figure 6 This is another exemplary scenario diagram of the application switching method provided in the embodiments of this application.
[0088] and Figure 5B In example (a), the window size of the last frame of the startup animation of application A, as shown in the example, occupies approximately 80% of the screen size, which is different from other animations. Figure 6 As shown in (a), the window size of the last frame of the startup animation of application A occupies approximately 60% of the screen size. In this case, the size of the window of application B at the start of the transition animation can also gradually increase from 60% of the screen size. However, to ensure that the playback duration of the transition animation is relatively consistent, therefore, as shown in (a), the window size of application B can also gradually increase from 60% of the screen size. Figure 6 As shown in (b), the increment of window B during its enlargement can be larger. This continues until the transition effect ends, as... Figure 6 As shown in (c), the electronic device displays application window B in full screen.
[0089] In some embodiments, the application B launched by the user can be a landscape application (e.g., a landscape game application). In this case, the playback effect after the transition animation is prepared can also be different from that when application B is a portrait application.
[0090] Please see Figure 7 This is another exemplary scenario diagram of the application switching method provided in the embodiments of this application.
[0091] After the transition animation is complete, the electronic device ends the startup animation of application A, retaining the window of the last frame of application A's startup animation. If application B is a landscape application, such as Figure 7 As shown in (a), when the transition effect starts playing, the startup animation window of application A can be moved from the top of the screen to off-screen, while the window of application B can be moved from the bottom of the screen to inside the screen.
[0092] like Figure 7 As shown in (b), the transition effect continues to play, with window B panning and zooming in simultaneously. This continues until the transition effect ends, as shown in [image / description]. Figure 7 As shown in (c), the electronic device displays application window B in landscape mode in full screen.
[0093] It is understood that the above embodiments are only some exemplary scenarios of the application of the switching method in the embodiments of this application. In actual applications, based on different settings and needs, there can be more different specific scenarios and animation display methods, which are not limited here.
[0094] The application switching method in this application embodiment will be described below with reference to the above exemplary scenario diagram:
[0095] Please see Figure 8This is a flowchart illustrating the application of the switching method in an embodiment of this application.
[0096] S801, In response to the operation of launching a first application on the desktop, play the first launch animation of the first application in the launch window;
[0097] The desktop represents the main interface of an electronic device, used to display application icons and widgets. The first application is the application the user initially attempts to launch. The launch window is a separate window that displays launch animations during application loading. The first launch animation is a series of visual animation effects designed for the first application to launch, providing visual feedback during application loading.
[0098] Specifically, when a user clicks or touches the icon of the first application on the desktop of an electronic device, the system recognizes this launch action. The system then creates a launch window and begins playing a launch animation designed for the first application within this window. This launch animation typically includes a series of carefully crafted animation sequences, which may involve elements such as the application icon's transformation, color change, and position movement. The launch window gradually expands, potentially eventually covering the entire screen. This process occurs synchronously with the actual loading of the application; an exemplary process can be found in [reference needed]. Figure 2 The user interface shown in (a) to (b) is shown in the image.
[0099] S802. During the playback of the first startup animation, in response to a touch operation on the icon position of the second application on the desktop, the first startup animation ends and the transition animation begins to play.
[0100] An exemplary process can be referred to Figure 5A (b) in Figure 5B The user interface is shown in (b). The second application is the application the user actually wants to open, distinct from the first application initially attempted to launch. Transition effects refer to the animation effects displayed when switching from one application to another.
[0101] In some embodiments, depending on the settings, the touch operation can be of many kinds, such as a click operation, a double click operation, a two-finger pull operation, etc., and is not limited here.
[0102] In some embodiments, there can be many specific ways to end the first startup animation playback transition animation, for example, it can be... Figure 4A The prompt text shown is displayed directly on the launch animation of application A; for example, it could be... Figure 4B The startup animation shown for DirectPlay application B could be, for example, a... Figure 5BThe example shows a smooth transition between the windows of application A and application B. For example, it could also be a gradient transition (the startup animation of application A gradually fades out, while the interface components of application B are enhanced), or other methods, which are not limited here.
[0103] In some embodiments, when a smooth transition is performed, the proportion of the screen size occupied by the application A window at the end of the application A's launch animation may differ, such as... Figure 5B and Figure 6 As shown, the transition effect can start playing with the size of the last frame of application A's window as the size of application B's window when application A's startup effect ends, thus ensuring a smooth effect.
[0104] In some embodiments, such as Figure 7 As shown, application A is a portrait application, while application B is a landscape application. When playing transition effects, the startup animation window of application A can be moved from the top of the screen to off-screen, while the window of application B can be moved from the bottom of the screen to inside-screen.
[0105] In some embodiments, such as Figure 2 As shown, the icon of the second application is not covered by the launch window of the first application's launch animation, and the electronic device can respond to touch operations on the location of the icon of the second application, such as a click operation.
[0106] In some embodiments, even if such Figure 3 The icon of the second application is covered by the launch window of the first application's launch animation. The electronic device can also trigger the launch of the second application by receiving a preset pass-through operation. This preset pass-through operation can be a knuckle tap, two-finger tap, or single-finger double tap, which is not easily confused with the user's intention of a normal single-finger tap operation.
[0107] S803. After the transition effect is played, the interactive interface of the second application is displayed in full screen.
[0108] After the transition effect plays, the electronic device is ready to display the new application interface and can display the interactive interface of the second application in full screen. The interactive interface of the second application includes the application's functions, content, and user interface elements. This interactive interface of the second application is presented on the screen of the electronic device, allowing the user to see and interact with it. In some embodiments, the interactive interface of the second application may also be referred to as the interface or display interface of the second application; no limitation is made here.
[0109] The application switching method in this embodiment allows users to switch directly to a second application during the startup process of the first application, without waiting for the first application to fully load or performing cumbersome multi-step operations. This significantly improves the efficiency and smoothness of application switching, and reduces user waiting time and operation steps.
[0110] To gain a more detailed understanding of the application switching method in the embodiments of this application, the software structure framework of the electronic device in the embodiments of this application will be described below.
[0111] Figure 9 This is a schematic block diagram of the software structure of an electronic device according to an embodiment of this application.
[0112] A layered architecture divides software into several layers, each with a clear role and function. Layers communicate with each other through software interfaces. In some embodiments, the system is divided into four layers, from top to bottom: the application layer, the application framework layer, the runtime and system libraries, and the kernel layer.
[0113] The application layer can include a series of application packages.
[0114] like Figure 9 As shown, application packages can be divided into system applications and third-party applications. Third-party applications can include camera, gallery, calendar, call, map, navigation, WLAN, Bluetooth, music, video, SMS, and other applications (also called apps). System applications can include desktop and system user interface components such as SystemUI.
[0115] The desktop is the main interface of an electronic device, used to display and manage application icons, widgets, etc. It is the primary entry point for user interaction with the device, providing basic functions such as launching applications, organizing icons, and switching interfaces. In this embodiment, the desktop application may further include an input event listener component and a scene recognition component, wherein:
[0116] The input event listener component is responsible for capturing and processing various input operations performed by the user on the desktop, such as clicking, swiping, and long pressing.
[0117] The scene recognition component is used to determine whether the user has entered an additional click-to-start scene based on the user's actions and current state.
[0118] The SystemUI component is the core component of the system user interface, responsible for managing and displaying system-level UI elements such as the status bar, navigation bar, and notification panel. In this embodiment, SystemUI may further include a custom animation component and an animation framework component. The custom animation component includes pre-defined transition animations; the animation framework component is used to execute animations prepared by the application framework layer.
[0119] The application framework layer provides application programming interfaces (APIs) and a programming framework for applications in the application layer. The application framework layer includes some predefined functions.
[0120] like Figure 9 As shown, the application framework layer may include Window Manager (WMS), Application Management Service (AMS), Content Provider, View System, Phone Manager, Resource Manager, Notification Manager, etc.
[0121] The Window Manager (WMS) is used to manage windowed applications. The Window Manager can obtain the screen size, determine if a status bar is present, lock the screen, and capture screenshots, among other things.
[0122] Application Management Service (AMS) is used to manage the lifecycle and runtime status of applications.
[0123] Content providers store and retrieve data, making that data accessible to applications. This data may include videos, images, audio, made and received phone calls, browsing history and bookmarks, phone books, etc.
[0124] A view system includes visual controls, such as controls for displaying text and controls for displaying images. View systems can be used to build applications. A display interface can consist of one or more views. For example, a display interface including a text notification icon could include views for displaying text and views for displaying images.
[0125] A phone manager is used to provide communication functions for electronic devices. For example, it manages call status (including connection and disconnection).
[0126] The file explorer provides applications with various resources, such as localized strings, icons, images, layout files, video files, and more.
[0127] The notification manager allows applications to display notifications in the status bar. These notifications can be used to deliver informational messages and can disappear automatically after a short pause, requiring no user interaction. For example, the notification manager can be used to notify users of completed downloads or message alerts. The notification manager can also display notifications as icons or scrolling text in the top status bar, such as notifications from background applications, or as dialog-style notifications on the screen. Examples include displaying text messages in the status bar, emitting sounds, vibrating electronic devices, and flashing indicator lights.
[0128] In this embodiment of the application, the Window Manager (WMS) may include system animation services, animation framework services, layered parameter services, etc., wherein:
[0129] The system animation service can handle animation effects in various system interface transitions, window switching scenarios, etc. In the embodiments of this application, the system animation service can be responsible for handling transition animations during application switching, ensuring a smooth and natural visual transition from one application to another.
[0130] The motion effects framework service provides an extensible animation effects framework that allows developers to customize and implement various complex animation effects. It can include a series of predefined animation types (such as translation, scaling, rotation, etc.) and animation interpolators, enabling developers to flexibly combine these basic elements to create rich animation effects.
[0131] The layered parameter service manages the hierarchical relationships and related parameters of windows and views. In a multi-window environment, this component is responsible for determining the Z-order (display hierarchy), transparency, size, position, and other parameters of each window. During application switching, the layered parameter service can be used to adjust the window parameters of the application being exited and the application being entered to achieve a smooth visual effect.
[0132] The runtime includes the core libraries and the virtual machine. The runtime is responsible for system scheduling and management.
[0133] The core library consists of two parts: one part is the functionalities that the programming language (e.g., Java) needs to call, and the other part is the system's core library.
[0134] The application layer and application framework layer run in a virtual machine. The virtual machine executes the programming files (e.g., .jave files) of the application layer and application framework layer as binary files. The virtual machine is used to perform functions such as object lifecycle management, stack management, thread management, security and exception management, and garbage collection.
[0135] System libraries can include multiple functional modules. For example: surface manager, media libraries, 3D graphics processing libraries (e.g., OpenGL ES), 2D graphics engines (e.g., SGL), etc.
[0136] The Surface Manager is used to manage the display subsystem and provides the fusion of two-dimensional (2D) and three-dimensional (3D) layers for multiple applications.
[0137] The media library supports playback and recording of various common audio and video formats, as well as still image files. It supports multiple audio and video encoding formats, such as MPEG4, H.264, MP3, AAC, AMR, JPG, and PNG.
[0138] The 3D graphics processing library is used to implement 3D graphics drawing, image rendering, compositing, and layer processing.
[0139] A 2D graphics engine is a graphics engine for 2D drawing.
[0140] The kernel layer is the layer between hardware and software. The kernel layer includes at least the display driver, camera driver, audio driver, sensor driver, and virtual card driver.
[0141] The following example illustrates the workflow of electronic device software in the context of application switching scenarios.
[0142] Figure 10 This is a schematic diagram of a workflow for application switching in an embodiment of this application;
[0143] This workflow primarily involves the application framework layer, the application desktop, and the application system user interface component SystemUI. Through desktop event listening and scene recognition, it identifies whether the user clicks on application B while launching application A. If so, it notifies the framework to launch application B and execute customized animations. Specifically:
[0144] 1. When a user clicks the application A icon on the desktop, the desktop is now active and can directly receive and respond to user input events. In this state, responding to the user's click on the application A icon can directly trigger the launch of application A, and the framework receives the request to launch application A.
[0145] 2. The framework is prepared to apply the startup animation of A;
[0146] 3. After the framework completes the preparation of the startup animation for application A, it sends a notification to SystemUI that the startup animation preparation is complete.
[0147] 4. SystemUI executes the startup animation of application A: Play the startup animation of application A in the startup window of application A on the desktop, and at this time the focus moves to the startup window of application A;
[0148] 5. During the launch animation of application A, the input event consumer of the desktop's input event listener component continuously listens for user input. When the user clicks the icon of application B, since the focus is on the launch window of application A and not on the desktop, the desktop cannot directly respond to the user's click operation. Therefore, the event is passed to the desktop's scene recognition component.
[0149] 6. The scene recognition component determines that the current application A is in the process of launching the animation, and the click location is outside the coverage area of the animation window and is not in the gesture hot zone. It confirms that this is an additional click launch scene, so the click event is passed through to the corresponding click location on the desktop (i.e., click the application B icon).
[0150] 7. The desktop sends a request to launch application B to the framework;
[0151] 8. The framework receives a request to launch application B and prepares for the transition animation.
[0152] 9. The framework completes the preparation of the transition animation and notifies SystemUI;
[0153] 10. SystemUI terminates the startup animation of application A;
[0154] 11. SystemUI executes transition animations from application A to application B.
[0155] In this workflow, the additional input event consumer added to the desktop application allows for the capture and processing of user click events on the app B icon, even while app A's launch animation is playing. The scene recognition component's logic ensures that switching to app B is only triggered under specific conditions (app A's launch animation is playing and the click location is appropriate). This design allows users to immediately switch to the correct app after realizing they've launched the wrong app, without waiting for the first app to fully launch. Custom transition effects further ensure visual continuity and smoothness, enhancing the user experience.
[0156] The application switching method in this application embodiment will be described in detail below, taking into account the software framework and workflow of the exemplary electronic device described above:
[0157] Please see Figures 11A-11B This is a set of exemplary information interaction diagrams illustrating the application of the switching method in the embodiments of this application.
[0158] Steps S1101 to S1106 are the process of playing the startup animation of application A after the desktop receives a click operation on the icon of application A. The process is similar to that in related technologies and will not be described in detail here.
[0159] S1101, The desktop receives a click operation at the icon location of application A;
[0160] S1102, The desktop sends the command to launch application A to the application framework layer;
[0161] S1103, The application framework layer prepares the startup animation for application A;
[0162] S1104. The application framework layer sends a notification to the system user interface component that the startup animation of application A is ready.
[0163] S1105. The system user interface component sends the startup animation execution command for application A to the desktop;
[0164] S1106. The desktop displays the startup animation of application A in the startup window of application A;
[0165] In this context, the desktop refers to the main interface of the electronic device, used to display and manage application icons, widgets, etc. The desktop is also an internal application within the system. Application A refers to the application the user initially attempts to launch, and the icon position of Application A refers to the screen area occupied by the icon of Application A on the desktop. A click operation refers to a brief touch action performed by the user on the touchscreen using a finger or stylus. In some embodiments, it may also be other preset launch operations for Application A, which are not limited here.
[0166] In the native mechanism of the Android system, when application A is launched from the desktop, after the launch animation begins, the window focus switches from the desktop to the window of application A, at which point the desktop can no longer receive input events. However, in this embodiment, steps S1107-S1109 can be used to pass the input event to the desktop when the conditions are met:
[0167] S1107. During the start-up animation playback, a click operation is received at the icon position of application B;
[0168] Since the system focus has now shifted to the launch window of application A, the conventional touch event handling mechanism cannot capture this action. Therefore, a special mechanism is needed to receive and process this additional click action.
[0169] In some embodiments, during the start-up animation playback, a swipe-up channel can be used to listen for all input events on the desktop, and then the input event is sent to a specific consumer based on the event type. In traditional Android systems, the swipe-up channel is mainly used to listen for operations such as returning to the home screen or opening the recent tasks list.
[0170] It's understandable that using a swipe-up channel to listen for all desktop input events during startup animation playback is a preferred example. However, in practical applications, other methods can also be used to listen for and determine desktop input events during startup animation playback. For example, alternatively, a dedicated input event handling thread can run continuously during application startup animation playback to capture and process all input events; alternatively, the window focus management strategy can be temporarily adjusted during startup animation playback so that the desktop can still receive input events; alternatively, a hardware-level event bus mechanism can be used to capture all input events at the underlying level and pass them to the desktop event listening component, etc. Other methods are also possible and are not limited here.
[0171] S1108. Determine that the click operation meets the additional click-initiated scenario;
[0172] Taking the use of the swipe-up channel to listen for input events during startup animation playback as an example, if the user clicks again during the startup of application A, the swipe-up channel on the desktop will receive the click event and perform scene recognition.
[0173] In some embodiments, if the click event occurs during a launch animation, the click coordinates are not covered by the application launch window, and the click is not a gesture hotspot event, then the click operation meets the criteria for an additional click launch scenario, and the click event needs to be sent to the input consumer. Otherwise, the click event is not processed.
[0174] Non-gesture hotspot events refer to touch events that occur on the screen of an electronic device and do not belong to predefined gesture or function areas. In the user interface design of electronic devices, there are usually some predefined gesture areas used for specific gesture operations or function triggers; these areas are called "gesture hotspots." For example, the edge of the screen might be designed for swiping to go back or bringing up a menu. Non-gesture hotspot events, on the other hand, refer to touch events that occur outside these predefined gesture hotspots, typically user actions within ordinary interface areas.
[0175] In some embodiments, other methods may be used to determine whether the click operation meets the criteria for an additional click-to-launch scenario:
[0176] For example, a machine learning model can be trained to identify a user's intent. This model can consider more factors, such as the user's historical operation patterns, the speed and force of clicks, to more accurately determine whether an additional click-initiated scenario is involved.
[0177] For example, a user confirmation mechanism can be used to pop up a quick confirmation dialog box when a possible additional click to launch the application is detected, allowing the user to clearly choose whether to switch to the new application.
[0178] For example, a preset pass-through operation can be set up so that the user can make a specific gesture on the B icon (such as tapping with a knuckle, drawing a circle, etc.) to clearly indicate that they want to switch to B, thus determining that the current scenario is an additional click to launch.
[0179] Understandably, there are many other ways to determine whether the current operation meets the criteria for additional click-to-start, depending on the settings; these are not limited here.
[0180] S1109. Pass the click event to the desktop and apply it to the icon of application B;
[0181] The input consumer stores the desktop layout information. Upon receiving an event from the swipe-up channel, it passes the input event to the desktop. Once received, if the desktop receives the input event and it applies it to the icon of application B, then application B is launched.
[0182] When entering the launch process of application B and obtaining the launch parameters of application B, if the current scenario is an additional click launch, application B can be launched through S1110~S1112:
[0183] S1110, The desktop sends a notification to the system user interface components that it has entered an additional click-to-launch scenario;
[0184] S1111, The desktop sends a notification to the application framework layer that it has entered an additional click-to-launch scenario;
[0185] S1112. The desktop sends a command to the application framework layer to launch application B;
[0186] After confirming the entry into an additional click launch scenario, the desktop needs to notify other key components in the system so that they can adjust their behavior accordingly. Therefore, when launching application B, if it is determined that the current scenario is an additional click scenario, the launch parameter can be obtained as null, so that the system transition custom animation can be used when switching applications in the subsequent application selection animation. At the same time, this scenario is marked as an additional click launch scenario, and the system user interface component SystemUI and the application framework layer are notified.
[0187] When application B is launched, the launch animation of application A is playing. If the playback of the launch animation of application A is interrupted immediately, the launch window of application A may immediately fill the entire screen the moment the launch animation is interrupted. In this embodiment, steps S1113 to S1122 can be used to process the launch animation of application A and the transition animation of application B to achieve a smooth and seamless switch between application A and application B:
[0188] S1113. When the application framework layer determines that the current scenario is an additional click-to-launch scenario, it prepares the transition animation.
[0189] In scenarios requiring additional clicks to launch, the application framework layer needs to prepare special transition animations to smoothly transition from the launch animation of application A to the interface of application B.
[0190] S1114. After the transition animation is ready, the application framework layer notifies the system user interface components to execute the transition animation.
[0191] Once the transition animation is ready, the application framework layer needs to notify the system user interface component SystemUI to execute the animation. This ensures that the animation is executed at the correct timing and that system UI elements (such as the status bar and navigation bar) are coordinated with the transition animation.
[0192] S1115. In this additional click-to-launch scenario, the system user interface component determines that the launch animation of application A is in progress and prepares to merge the launch animation of application A.
[0193] After receiving a notification to execute a transition animation, the system user interface component first needs to confirm the current state of application A's startup animation and prepare to merge it with the new transition animation.
[0194] S1116. The system user interface component notifies the desktop to merge the application A startup animation.
[0195] To achieve a smooth animation merging, the system user interface components need to coordinate with the desktop application, since the desktop application still controls the launch animation of application A.
[0196] S1117. The startup animation of application A on the desktop is terminated. The startup window layer and desktop layer of the startup animation are remounted to the corresponding layer control interface, and these two layer control interfaces are remounted to the default display area.
[0197] To avoid directly interrupting the playback of application A's launch animation and causing the launch window to fill the entire screen, the desktop, upon ending application A's launch animation (pausing it at the current frame), remounts both the launch window layer and the desktop layer to their respective layer control interfaces. This allows these two layers to be manipulated independently. The launch window layer is the layer displaying application A's launch animation, while the desktop layer displays the desktop content and serves as the desktop background for the launch window layer.
[0198] After remounting these two layers to their corresponding layer control interfaces, remount these two layer control interfaces to the default display area, which is the main screen area of the electronic device. This ensures that the two layers are displayed in a controlled manner on the main screen of the electronic device and do not expand uncontrollably.
[0199] Specifically, in some embodiments, the desktop can send a signal to end the application A launch animation by calling the interface of the window manager in the application framework layer, causing the window manager to stop further execution of the application A launch animation and retain the current state; the desktop can request the window manager to reorganize the layer structure: remove the application A launch window layer from the special animation container, restore the desktop layer from a possible hidden state, create a new SurfaceControl object, and manage the two layers respectively; finally, the desktop can instruct the window manager to mount the newly created SurfaceControl object to the default display area.
[0200] S1118. The ratio of the startup window relative to the screen size in the last frame of the startup animation when the desktop computing application A ends is used as the transition animation parameter.
[0201] In some embodiments, the desktop can obtain the current size and position of the application A's launch window by querying WMS; obtain the actual screen resolution; calculate the ratio of the launch window size to the screen size: ratio = (launch window width / screen width, launch window height / screen height); and package the calculated ratio value into a transition animation parameter object.
[0202] Since the transition effects are executed on the same electronic device, in some embodiments, the current size of the last frame's startup window can be directly used as the transition effect parameter, which is not limited here.
[0203] S1119. The desktop passes the transition animation parameters to the system user interface components;
[0204] S1120. The system user interface component loads the transition effect based on the transition effect parameters;
[0205] The transition animation parameter is the ratio of the launch window of application A to the screen size in the last frame when the launch animation of application A ends. Based on this transition animation parameter, loading the transition animation can make the exit window of application A and the entrance window of application B in the transition animation consistent with this ratio, thus making the transition animation smooth and fluid.
[0206] In some embodiments, the system user interface component can parse transition animation parameters, extract window scale information, configure the start state of the transition animation based on these parameters, select an appropriate animation interpolator and duration, and then load the transition animation based on these configurations.
[0207] S1121. The system user interface components are set to use the desktop wallpaper instead of a gray-white background.
[0208] In some embodiments, the system user interface component can configure the background layer of the transition animation, disable the default gray-white background setting, obtain a reference or snapshot of the current desktop wallpaper, and set the desktop wallpaper as the background layer of the transition animation. This maintains visual continuity and avoids abrupt background changes during the transition.
[0209] S1122. After the transition animation is completed, the system user interface components will reset the scene to the default value and clear the animation parameters.
[0210] In some embodiments, a transition animation completion event can be listened for. After the animation completes, the internal scene flags are reset to their default values, all temporary parameters and states related to this transition are cleared, and then the WMS is notified that the transition is complete and normal window management mode can be restored. This restores the normal state after completing a special transition effect, preparing for subsequent operations.
[0211] S1123. The system user interface component sends a notification to the desktop that the transition animation has been completed.
[0212] S1124. Display the interactive interface of application B in full-screen mode on the desktop.
[0213] In some embodiments, after receiving a transition completion notification, the desktop can request the application framework layer to elevate application B's window to the top layer. Specifically, the window stack can be adjusted through the window manager in the application framework layer to make application B's window the topmost visible. The desktop can then perform cleanup operations, such as removing any remaining overlays or temporary views. At this point, application B is in the foreground and can begin normal user interaction.
[0214] In some embodiments of this application, application A may also be referred to as the first application, and application B may also be referred to as the second application; no limitation is made here.
[0215] In some embodiments, the preparation and execution of startup and transition animations are primarily achieved through the interaction between the animation framework component in the SystemUI of the application layer, the animation framework service in the window manager WMS of the application framework layer, and the application management service AMS of the application layer.
[0216] Please see Figure 12 This is an exemplary information interaction diagram between components in the application switching method of this application embodiment.
[0217] In some embodiments, step S1102 involves the desktop sending an instruction to the application management service in the application framework layer to launch application A. Upon receiving this instruction, the application management service notifies the animation framework service to prepare the launch animation for application A. After preparation is complete, the animation framework service sends a notification that the launch animation for application A is ready to the animation framework component. The animation framework component then sends an execution instruction for the launch animation of application A to the desktop. The desktop then executes step S1106, playing the launch animation of application A in the launch window.
[0218] In some embodiments, in the additional click-to-launch scenario, step S1112 above involves the desktop sending an instruction to the application management service in the application framework layer to launch application B. Upon receiving this instruction, the application management service notifies the animation framework service in the window manager (WMS) to prepare transition animations for application B.
[0219] The motion effects framework service begins preparing transition animations. During the preparation of transition animations, necessary SurfaceControl objects can be created to manage layers during the transition process, and animation resources (such as bitmap caches or shader programs) can be prepared.
[0220] After the transition preparation is complete, the motion effects framework service notifies the motion effects framework component in SystemUI to execute the transition animation. Since the motion effects framework component can determine that application A's launch animation is in progress in this additional click-to-launch scenario, it prepares to merge application A's launch animation. In some embodiments, the motion effects framework component can query the WMS to obtain the current execution status of application A's launch animation, including animation progress, current window size, and other information. Then, it analyzes the remaining time of application A's launch animation and the time required for the transition animation, calculates the optimal merging point, and thus completes the preparation to merge application A's launch animation.
[0221] After the animation framework component completes the preparation for merging the startup animation of application A, step S1116 can be executed to notify the desktop to merge the startup animation of application A.
[0222] The following describes an exemplary electronic device provided in the embodiments of this application.
[0223] Figure 13 This is a schematic diagram of the structure of the electronic device 100 provided in the embodiments of this application.
[0224] The following detailed description uses electronic device 100 as an example. It should be understood that electronic device 100 may have more or fewer components than shown in the figures, may combine two or more components, or may have different component configurations. The various components shown in the figures can be implemented in hardware, software, or a combination of hardware and software, including one or more signal processing and / or application-specific integrated circuits.
[0225] Electronic device 100 may include: processor 110, external memory interface 120, internal memory 121, universal serial bus (USB) interface 130, charging management module 140, power management module 141, battery 142, antenna 1, antenna 2, mobile communication module 150, wireless communication module 160, audio module 170, speaker 170A, receiver 170B, microphone 170C, headphone jack 170D, sensor module 180, button 190, motor 191, indicator 192, camera 193, display screen 194, and subscriber identification module (SIM) card interface 195, etc. The sensor module 180 may include a pressure sensor 180A, a gyroscope sensor 180B, a barometric pressure sensor 180C, a magnetic sensor 180D, an accelerometer 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, etc.
[0226] It is understood that the structures illustrated in the embodiments of this application do not constitute a specific limitation on the electronic device 100. In other embodiments of this application, the electronic device 100 may include more or fewer components than illustrated, or combine some components, or split some components, or have different component arrangements. The illustrated components may be implemented in hardware, software, or a combination of software and hardware.
[0227] Processor 110 may include one or more processing units, such as: application processor (AP), modem processor, graphics processing unit (GPU), image signal processor (ISP), controller, memory, video codec, digital signal processor (DSP), baseband processor, and / or neural network processing unit (NPU), etc. Different processing units may be independent devices or integrated into one or more processors.
[0228] The controller can be the nerve center and command center of the electronic device 100. The controller can generate operation control signals according to the instruction opcode and timing signals to complete the control of fetching and executing instructions.
[0229] The processor 110 may also include a memory for storing instructions and data. In some embodiments, the memory in the processor 110 is a cache memory. This memory can store instructions or data that the processor 110 has just used or that are used repeatedly. If the processor 110 needs to use the instruction or data again, it can retrieve it directly from the memory. This avoids repeated accesses, reduces the waiting time of the processor 110, and thus improves the efficiency of the system.
[0230] In some embodiments, the processor 110 may include one or more interfaces. Interfaces may include an inter-integrated circuit (I2C) interface, an inter-integrated circuit sound (I2S) interface, a pulse code modulation (PCM) interface, a universal asynchronous receiver / transmitter (UART) interface, a mobile industry processor interface (MIPI), a general-purpose input / output (GPIO) interface, a subscriber identity module (SIM) interface, and / or a universal serial bus (USB) interface, etc.
[0231] The charging management module 140 is used to receive charging input from the charger. The charger can be a wireless charger or a wired charger.
[0232] The power management module 141 is used to connect the battery 142, the charging management module 140, and the processor 110. The power management module 141 receives input from the battery 142 and / or the charging management module 140 to power the processor 110, internal memory 121, external memory, display 194, camera 193, and wireless communication module 160, etc.
[0233] The wireless communication function of electronic device 100 can be realized through antenna 1, antenna 2, mobile communication module 150, wireless communication module 160, modem processor and baseband processor, etc.
[0234] Antenna 1 and antenna 2 are used to transmit and receive electromagnetic wave signals. Each antenna in electronic device 100 can be used to cover one or more communication frequency bands. Different antennas can also be multiplexed to improve antenna utilization. For example, antenna 1 can be multiplexed as a diversity antenna for a wireless local area network. In some other embodiments, the antennas can be used in conjunction with tuning switches.
[0235] The mobile communication module 150 can provide solutions for wireless communication, including 2G / 3G / 4G / 5G, applied to the electronic device 100. The mobile communication module 150 may include at least one filter, switch, power amplifier, low noise amplifier (LNA), etc. The mobile communication module 150 can receive electromagnetic waves via antenna 1, and perform filtering, amplification, and other processing on the received electromagnetic waves before transmitting them to a modem processor for demodulation. The mobile communication module 150 can also amplify the signal modulated by the modem processor and convert it into electromagnetic waves for radiation via antenna 1. In some embodiments, at least some functional modules of the mobile communication module 150 may be housed in the processor 110. In some embodiments, at least some functional modules of the mobile communication module 150 and at least some modules of the processor 110 may be housed in the same device.
[0236] The modem processor may include a modulator and a demodulator. The modulator modulates the low-frequency baseband signal to be transmitted into a mid-to-high frequency signal. The demodulator demodulates the received electromagnetic wave signal into a low-frequency baseband signal. The demodulator then transmits the demodulated low-frequency baseband signal to the baseband processor for processing. After processing by the baseband processor, the low-frequency baseband signal is transmitted to the application processor. The application processor outputs sound signals through audio devices (not limited to speaker 170A, receiver 170B, etc.) or displays images or videos through the display screen 194. In some embodiments, the modem processor may be a separate device. In other embodiments, the modem processor may be independent of the processor 110 and may be housed in the same device as the mobile communication module 150 or other functional modules.
[0237] The wireless communication module 160 can provide solutions for wireless communication applications on the electronic device 100, including wireless local area networks (WLAN) (such as wireless fidelity (Wi-Fi) networks), Bluetooth (BT), global navigation satellite system (GNSS), frequency modulation (FM), near field communication (NFC), and infrared (IR) technologies. The wireless communication module 160 can be one or more devices integrating at least one communication processing module. The wireless communication module 160 receives electromagnetic waves via antenna 2, performs frequency modulation and filtering of the electromagnetic wave signals, and sends the processed signal to processor 110. The wireless communication module 160 can also receive signals to be transmitted from processor 110, perform frequency modulation and amplification, and convert them into electromagnetic waves for radiation via antenna 2.
[0238] In some embodiments, antenna 1 of electronic device 100 is coupled to mobile communication module 150, and antenna 2 is coupled to wireless communication module 160, enabling electronic device 100 to communicate with networks and other devices via wireless communication technology. The wireless communication technology may include Global System for Mobile Communications (GSM), General Packet Radio Service (GPRS), Code Division Multiple Access (CDMA), Wideband Code Division Multiple Access (WCDMA), Time-Division Code Division Multiple Access (TD-SCDMA), Long Term Evolution (LTE), BT, GNSS, WLAN, NFC, FM, and / or IR technologies. The GNSS may include Global Positioning System (GPS), Global Navigation Satellite System (GLONASS), BeiDou Navigation Satellite System (BDS), Quasi-Zenith Satellite System (QZSS), and / or Satellite Based Augmentation Systems (SBAS).
[0239] Electronic device 100 implements display functions through a GPU, a display screen 194, and an application processor. The GPU is a microprocessor for image processing, connected to the display screen 194 and the application processor. The GPU is used to perform mathematical and geometric calculations and for graphics rendering. Processor 110 may include one or more GPUs, which execute program instructions to generate or modify display information.
[0240] Display screen 194 is used to display images, videos, etc. Display screen 194 includes a display panel. The display panel can be a liquid crystal display (LCD). The display panel can also be manufactured using organic light-emitting diodes (OLEDs), active-matrix organic light-emitting diodes (AMOLEDs), flexible light-emitting diodes (FLEDs), miniled, microled, micro-OLEDs, quantum dot light-emitting diodes (QLEDs), etc. In some embodiments, electronic device 100 may include one or N displays 194, where N is a positive integer greater than 1.
[0241] Electronic device 100 can perform shooting functions through ISP, camera 193, video codec, GPU, display 194 and application processor.
[0242] Internal memory 121 may include one or more random access memory (RAM) and one or more non-volatile memory (NVM).
[0243] Random access memory can include static random-access memory (SRAM), dynamic random access memory (DRAM), synchronous dynamic random access memory (SDRAM), double data rate synchronous dynamic random access memory (DDR SDRAM, for example, fifth-generation DDR SDRAM is generally called DDR5 SDRAM), etc.
[0244] Non-volatile memory can include disk storage devices and flash memory.
[0245] Flash memory can be classified according to its operating principle, including NOR FLASH, NAND FLASH, 3D NAND FLASH, etc.; according to the level of the storage cell, including single-level cell (SLC), multi-level cell (MLC), triple-level cell (TLC), quad-level cell (QLC), etc.; and according to the storage specification, including universal flash storage (UFS) and embedded multimedia card (eMMC), etc.
[0246] The random access memory can be directly read and written by the processor 110. It can be used to store executable programs (such as machine instructions) of the operating system or other running programs, as well as user and application data.
[0247] Non-volatile memory can also store executable programs and user and application data, and can be pre-loaded into random access memory for direct reading and writing by the processor 110.
[0248] The external memory interface 120 can be used to connect to external non-volatile memory, thereby expanding the storage capacity of the electronic device 100. The external non-volatile memory communicates with the processor 110 through the external memory interface 120 to perform data storage functions. For example, music, video, and other files can be stored in the external non-volatile memory.
[0249] Electronic device 100 can implement audio functions, such as music playback and recording, through audio module 170, speaker 170A, receiver 170B, microphone 170C, headphone jack 170D, and application processor.
[0250] The audio module 170 is used to convert digital audio information into analog audio signals for output, and also to convert analog audio input into digital audio signals. The audio module 170 can also be used for encoding and decoding audio signals. In some embodiments, the audio module 170 may be located in the processor 110, or some functional modules of the audio module 170 may be located in the processor 110.
[0251] The speaker 170A, also known as a "loudspeaker," is used to convert audio electrical signals into sound signals. The electronic device 100 can listen to music or make hands-free calls through the speaker 170A.
[0252] The receiver 170B, also known as the "earpiece," is used to convert audio electrical signals into sound signals. When the electronic device 100 answers a telephone call or voice message, the receiver 170B can be brought close to the ear to listen to the voice.
[0253] Microphone 170C, also known as a "microphone" or "voice transducer," is used to convert sound signals into electrical signals. When making a phone call or sending a voice message, the user can speak by bringing their mouth close to microphone 170C, inputting the sound signal into microphone 170C. Electronic device 100 may have at least one microphone 170C. In some embodiments, electronic device 100 may have two microphones 170C, which, in addition to collecting sound signals, can also perform noise reduction. In other embodiments, electronic device 100 may also have three, four, or more microphones 170C, which can collect sound signals, reduce noise, identify the sound source, and perform directional recording, etc.
[0254] The 170D headphone jack is used to connect wired headphones. The 170D headphone jack can be a USB 130 interface or a 3.5mm Open Mobile Terminal Platform (OMTP) standard interface, a CTIA (Cellular Telecommunications Industry Association of the USA) standard interface.
[0255] Pressure sensor 180A is used to sense pressure signals and convert them into electrical signals. In some embodiments, pressure sensor 180A can be disposed on display screen 194. There are many types of pressure sensors 180A, such as resistive pressure sensors, inductive pressure sensors, and capacitive pressure sensors. A capacitive pressure sensor may include at least two parallel plates with conductive material. When force is applied to pressure sensor 180A, the capacitance between the electrodes changes. Electronic device 100 determines the pressure intensity based on the change in capacitance. When a touch operation is applied to display screen 194, electronic device 100 detects the intensity of the touch operation based on pressure sensor 180A. Electronic device 100 can also calculate the touch position based on the detection signal from pressure sensor 180A. In some embodiments, touch operations applied to the same touch position but with different touch operation intensities can correspond to different operation commands. For example: when a touch operation with an intensity less than a first pressure threshold is applied to the SMS application icon, a command to view an SMS is executed. When a touch operation with an intensity greater than or equal to the first pressure threshold is applied to the SMS application icon, a command to create a new SMS is executed.
[0256] Touch sensor 180K, also known as a "touch panel," can be located on display screen 194. The touch sensor 180K and display screen 194 together form a touchscreen, also known as a "touch screen." Touch sensor 180K detects touch operations applied to or near it. The touch sensor can transmit the detected touch operation to the application processor to determine the type of touch event. Visual output related to the touch operation can be provided through display screen 194. In other embodiments, touch sensor 180K may also be located on the surface of electronic device 100, in a different position than display screen 194.
[0257] Buttons 190 include a power button, volume buttons, etc. Buttons 190 can be mechanical buttons or touch-sensitive buttons. Electronic device 100 can receive button input and generate key signal inputs related to user settings and function control of electronic device 100.
[0258] Motor 191 can generate vibration alerts. Motor 191 can be used for incoming call vibration alerts or for touch vibration feedback. For example, different vibration feedback effects can be corresponding to touch operations applied to different applications (such as taking photos, playing audio, etc.). Motor 191 can also correspond to different vibration feedback effects for touch operations applied to different areas of the display screen 194. Different application scenarios (such as time reminders, receiving messages, alarm clocks, games, etc.) can also correspond to different vibration feedback effects. The touch vibration feedback effect can also be customized.
[0259] Indicator 192 can be an indicator light, used to indicate charging status, power changes, or to indicate messages, missed calls, notifications, etc.
[0260] The SIM card interface 195 is used to connect a SIM card. The SIM card can be inserted into or removed from the SIM card interface 195 to make contact with and detach from the electronic device 100. The electronic device 100 can support one or N SIM card interfaces, where N is a positive integer greater than 1. The SIM card interface 195 can support Nano SIM cards, Micro SIM cards, and other SIM cards. Multiple cards can be inserted into the same SIM card interface 195 simultaneously. The multiple cards can be of the same or different types. The SIM card interface 195 is also compatible with different types of SIM cards. The SIM card interface 195 is also compatible with external memory cards. The electronic device 100 interacts with the network through the SIM card to realize functions such as calls and data communication.
[0261] The above-described embodiments are only used to illustrate the technical solutions of this application, and are not intended to limit it. Although this application has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that modifications can still be made to the technical solutions described in the foregoing embodiments, or equivalent substitutions can be made to some of the technical features. Such modifications or substitutions do not cause the essence of the corresponding technical solutions to deviate from the scope of the technical solutions of the embodiments of this application.
[0262] As used in the above embodiments, depending on the context, the term "when..." can be interpreted as meaning "if...", "after...", "in response to determining...", or "in response to detecting...". Similarly, depending on the context, the phrase "when determining..." or "if (the stated condition or event) is interpreted as meaning "if determining...", "in response to determining...", "when (the stated condition or event) is detected", or "in response to detecting (the stated condition or event)".
[0263] In the above embodiments, implementation can be achieved entirely or partially through software, hardware, firmware, or any combination thereof. When implemented using software, it can be implemented entirely or partially in the form of a computer program product. The computer program product includes one or more computer instructions. When the computer program instructions are loaded and executed on a computer, all or part of the processes or functions described in the embodiments of this application are generated. The computer can be a general-purpose computer, a special-purpose computer, a computer network, or other programmable device. The computer instructions can be stored in a computer-readable storage medium or transmitted from one computer-readable storage medium to another. For example, the computer instructions can be transmitted from one website, computer, server, or data center to another website, computer, server, or data center via wired (e.g., coaxial cable, fiber optic, digital subscriber line) or wireless (e.g., infrared, wireless, microwave, etc.) means. The computer-readable storage medium can be any available medium that a computer can access or a data storage device such as a server or data center that integrates one or more available media. The available medium can be a magnetic medium (e.g., floppy disk, hard disk, magnetic tape), an optical medium (e.g., DVD), or a semiconductor medium (e.g., solid-state drive), etc.
[0264] Those skilled in the art will understand that all or part of the processes in the methods of the above embodiments can be implemented by a computer program instructing related hardware. This program can be stored in a computer-readable storage medium, and when executed, it can include the processes described in the above method embodiments. The aforementioned storage medium includes various media capable of storing program code, such as ROM or random access memory (RAM), magnetic disks, or optical disks.
Claims
1. An application switching method, characterized in that, include: In response to launching the first application on the desktop, play the first launch animation of the first application in the launch window; During the first startup animation playback, in response to a touch operation on the icon position of the second application on the desktop, the first startup animation ends and the transition animation begins to play; After the transition effect is played, the interactive interface of the second application is displayed in full screen; During the first startup animation playback, responding to a touch operation on the icon location of the second application on the desktop specifically includes: Upon receiving a click event on the screen at the icon location of the second application, it is determined whether the click event conforms to an additional click launch scenario based on preset scenario rules. The preset scenario rules include: the click event is during a launch animation, the click coordinates are not covered by the launch window, and the click event is not a gesture hotspot event. If the click event is determined to match the additional click-to-launch scenario, the click event is passed through to the icon position of the second application on the desktop, responding to the click operation on the icon of the second application under the additional click-to-launch scenario, wherein the click operation is a type of touch operation.
2. The method according to claim 1, characterized in that, During the process of playing the first startup animation of the first application in the startup window, the startup window gradually enlarges; When the second application is a portrait-oriented application, the step of ending the first startup animation and starting the transition animation in response to a touch operation on the icon position of the second application on the desktop during the first startup animation playback specifically includes: During the first startup animation playback, in response to a touch operation on the icon location of a second application outside the coverage area of the startup window on the desktop, the first startup animation continues to play; After the transition animation is ready, stop playing the first startup animation, keep the window of the last frame of the first startup animation, and gradually move the window of the last frame of the first startup animation from inside the screen to outside the screen. In the same direction, gradually move the window of the second application from outside the screen to inside the screen, and gradually enlarge it until it fills the entire screen.
3. The method according to claim 1, characterized in that, During the process of playing the first startup animation of the first application in the startup window, the startup window gradually enlarges; When the second application is a landscape application, the step of ending the first startup animation and starting the transition animation in response to a touch operation on the icon position of the second application on the desktop during the first startup animation playback specifically includes: During the first startup animation playback, in response to a touch operation on the icon location of a second application outside the coverage area of the startup window on the desktop, the first startup animation continues to play; After the transition animation is ready, stop playing the first startup animation, keep the window of the last frame of the first startup animation, gradually move the window of the last frame of the first startup animation from the top of the screen to off the screen, and gradually move the window of the second application from the bottom of the screen to inside the screen in the same direction, and gradually enlarge it until it fills the entire screen during the movement.
4. The method according to claim 2 or 3, characterized in that, The initial size of the window of the second application is the same as the size of the window of the last frame.
5. The method according to claim 1, characterized in that, The method further includes: During the first startup animation playback, input events are listened for on the desktop via the swipe-up channel; If the input event is determined to match the additional click-to-launch scenario, the desktop is triggered to respond to the input event.
6. The method according to claim 1, characterized in that, The termination of the first startup animation specifically includes: Stop the execution of the first startup animation and retain the current window state; Remount the startup window layer and desktop layer of the first startup animation to the corresponding layer control interface; Remount these two layer control interfaces to the default display area.
7. The method according to claim 1, characterized in that, The method further includes: When the first startup animation ends, obtain the size of the startup window in the last frame; Determine the ratio of the size of the last frame's launch window to the screen size; The ratio value is determined as the parameter value for running the transition effect.
8. The method according to claim 1, characterized in that, The method further includes: Disable the default background settings before playing transition effects; Set the current desktop wallpaper as the background layer for the transition animation.
9. The method according to claim 1, characterized in that, The method further includes: After the transition animation is completed, reset the scene to the default value and clear the animation parameters.
10. The method according to claim 1, characterized in that, The step of ending the first startup animation and starting the transition animation specifically includes: After the first startup animation ends, the second startup animation of the second application is played directly as the transition animation.
11. An application switching method, characterized in that, include: In response to launching the first application on the desktop, play the first launch animation of the first application in the launch window; During the first startup animation playback, in response to a touch operation on the icon position of the second application on the desktop, the first startup animation ends and the transition animation begins to play; After the transition effect is played, the interactive interface of the second application is displayed in full screen; The step of responding to a touch operation at the icon location of the second application on the desktop during the first startup animation playback specifically includes: During the first startup animation playback, if a preset passthrough operation is received for the icon position of the second application covered by the startup window, it is determined that the current scenario is an additional click startup scenario, and the startup operation of the second application under the additional click startup scenario is responded to. The preset passthrough operation is a touch operation different from the click operation.
12. The method according to claim 11, characterized in that, During the process of playing the first startup animation of the first application in the startup window, the startup window gradually enlarges; When the second application is a portrait-oriented application, the step of ending the first startup animation and starting the transition animation in response to a touch operation on the icon position of the second application on the desktop during the first startup animation playback specifically includes: During the first startup animation playback, in response to a touch operation on the icon location of a second application outside the coverage area of the startup window on the desktop, the first startup animation continues to play; After the transition animation is ready, stop playing the first startup animation, keep the window of the last frame of the first startup animation, and gradually move the window of the last frame of the first startup animation from inside the screen to outside the screen. In the same direction, gradually move the window of the second application from outside the screen to inside the screen, and gradually enlarge it until it fills the entire screen.
13. The method according to claim 11, characterized in that, During the process of playing the first startup animation of the first application in the startup window, the startup window gradually enlarges; When the second application is a landscape application, the step of ending the first startup animation and starting the transition animation in response to a touch operation on the icon position of the second application on the desktop during the first startup animation playback specifically includes: During the first startup animation playback, in response to a touch operation on the icon location of a second application outside the coverage area of the startup window on the desktop, the first startup animation continues to play; After the transition animation is ready, stop playing the first startup animation, keep the window of the last frame of the first startup animation, gradually move the window of the last frame of the first startup animation from the top of the screen to off the screen, and gradually move the window of the second application from the bottom of the screen to inside the screen in the same direction, and gradually enlarge it until it fills the entire screen during the movement.
14. The method according to claim 12 or 13, characterized in that, The initial size of the window of the second application is the same as the size of the window of the last frame.
15. The method according to claim 11, characterized in that, The method further includes: During the first startup animation playback, input events are listened for on the desktop via the swipe-up channel; If the input event is determined to match the additional click-to-launch scenario, the desktop is triggered to respond to the input event.
16. The method according to claim 11, characterized in that, The termination of the first startup animation specifically includes: Stop the execution of the first startup animation and retain the current window state; Remount the startup window layer and desktop layer of the first startup animation to the corresponding layer control interface; Remount these two layer control interfaces to the default display area.
17. The method according to claim 11, characterized in that, The method further includes: When the first startup animation ends, obtain the size of the startup window in the last frame; Determine the ratio of the size of the last frame's launch window to the screen size; The ratio value is determined as the parameter value for running the transition effect.
18. The method according to claim 11, characterized in that, The method further includes: Disable the default background settings before playing transition effects; Set the current desktop wallpaper as the background layer for the transition animation.
19. The method according to claim 11, characterized in that, The method further includes: After the transition animation is completed, reset the scene to the default value and clear the animation parameters.
20. The method according to claim 11, characterized in that, The step of ending the first startup animation and starting the transition animation specifically includes: After the first startup animation ends, the second startup animation of the second application is played directly as the transition animation.
21. An electronic device, characterized in that, The electronic device includes: one or more processors and memory; The memory is coupled to the one or more processors, the memory being used to store computer program code, the computer program code including computer instructions, the one or more processors invoking the computer instructions to cause the electronic device to perform the method as described in any one of claims 1-20.
22. A computer program product containing instructions, characterized in that, When the computer program product is run on an electronic device, it causes the electronic device to perform the method as described in any one of claims 1-20.
23. A computer-readable storage medium comprising instructions, characterized in that, When the instructions are executed on an electronic device, the electronic device causes the electronic device to perform the method as described in any one of claims 1-20.