Application control method, application control device and storage medium
By pausing audio playback in advance when the audio and video application exits and recording the stack of picture-in-picture mode, the problem of still playing after the audio exit is solved, improving the user experience and realizing direct entry into picture-in-picture mode.
Patent Information
- Application Number
- CN202410186012.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-02-19
- Publication Date
- 2025-08-19
AI Technical Summary
When the audio and video application exits, the audio continues to play, resulting in poor user experience.
When the audio and video application exits, the pause life cycle is triggered in advance during the execution of the exit animation, the audio playback is paused, and the application stack of the picture-in-picture mode is recorded when the conditions are met to subsequently enter the picture-in-picture mode.
It avoids the problem of audio continuing to play after exiting the animation, improves the user experience, and ensures that the application can directly enter the Picture-in-Picture mode after exiting.
Smart Images

Figure CN120508328A_ABST
Abstract
Description
Technical Field
[0001] The present disclosure relates to the field of software technology, and in particular to an application control method, an application control device, and a storage medium. Background Art
[0002] With the development of terminal technology and the public's pursuit of leisure and entertainment, many electronic devices that support audio playback applications have been used by the public. However, when audio and video related applications are exited from the desktop, the audio still remains, affecting the user experience. Summary of the Invention
[0003] To overcome the problems existing in the related art, the present disclosure provides an application control method, an application control device, and a storage medium.
[0004] According to a first aspect of an embodiment of the present disclosure, an application control method is provided, comprising: in response to an electronic device detecting that a target application has exited and executing an exit animation, determining a pause lifecycle of a current interface display window of the target application, the target application being an application that supports audio playback, and the pause lifecycle being used to pause playback of audio of the target application; and triggering the pause lifecycle of the target application during execution of the exit animation.
[0005] In one embodiment, before triggering the pause lifecycle of the target application, the method further includes: determining that a pause condition is satisfied, the pause condition including at least one of the following: the target application is not in multi-window mode; the target application plays audio.
[0006] In one embodiment, the method further includes: in response to determining that the picture-in-picture mode needs to be executed when the pause lifecycle of the target application is triggered, recording a current application stack of the target application executing the picture-in-picture.
[0007] In one embodiment, the method further includes: after executing the exit animation, if there is a recorded current application stack, calling back the current application stack to control the application to execute picture-in-picture mode.
[0008] In one embodiment, the method further includes: clearing the current application stack after executing the exit animation.
[0009] According to a second aspect of an embodiment of the present disclosure, an application control device is provided, including a determination unit for determining the pause lifecycle of a current interface display window of the target application in response to an electronic device detecting that the target application has exited and executing an exit animation, wherein the target application is an application that supports audio playback, and the pause lifecycle is used to pause the playback of audio of the target application; and a processing unit for triggering the pause lifecycle of the target application during the execution of the exit animation.
[0010] In one embodiment, before triggering the pause lifecycle of the target application, the determination unit is further used to: determine whether a pause condition is met, and the pause condition includes at least one of the following: the target application is not in multi-window mode; the target application plays audio.
[0011] In one embodiment, the determining unit is further configured to: in response to determining that the picture-in-picture mode needs to be executed when the pause lifecycle of the target application is triggered, record a current application stack of the target application executing the picture-in-picture mode.
[0012] In one embodiment, the processing unit is further configured to: after executing the exit animation, if there is a recorded current application stack, call back the current application stack to control the application to execute a picture-in-picture mode.
[0013] In one embodiment, the processing unit is further configured to clear the current application stack after executing the exit animation.
[0014] According to a third aspect of an embodiment of the present disclosure, an electronic device is provided, comprising: a processor; and a memory for storing processor-executable instructions; wherein the processor is configured to execute the application control method described in the first aspect or any one of the implementations of the first aspect.
[0015] According to a fourth aspect of an embodiment of the present disclosure, a storage medium is provided, in which instructions are stored. When the instructions in the storage medium are executed by a processor, the processor is enabled to execute the application control method described in the first aspect or any one of the embodiments of the first aspect.
[0016] The technical solution provided by the embodiments of the present disclosure may include the following beneficial effects: in response to the electronic device detecting that the target application exits and executes the exit animation, determining the pause lifecycle of the current interface display window of the target application, and triggering the pause lifecycle of the target application during the execution of the exit animation, which can avoid the sound retention problem caused by the electronic device triggering the pause lifecycle after the exit animation is completed, thereby improving the user experience.
[0017] It is to be understood that the foregoing general description and the following detailed description are exemplary and explanatory only and are not restrictive of the disclosure. BRIEF DESCRIPTION OF THE DRAWINGS
[0018] The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the present disclosure and, together with the description, serve to explain the principles of the present disclosure.
[0019] Figure 1 The figure is a flowchart showing a method for exiting an application according to an exemplary embodiment.
[0020] Figure 2 The figure is a flowchart of an application control method according to an exemplary embodiment.
[0021] Figure 3 The figure is a flowchart of an application control method according to an exemplary embodiment.
[0022] Figure 4 The figure is a block diagram showing an application control device according to an exemplary embodiment.
[0023] Figure 5 It is a block diagram showing a device for application control according to an exemplary embodiment.
[0024] Figure 6 It is a block diagram showing a device for application control according to an exemplary embodiment. DETAILED DESCRIPTION
[0025] Exemplary embodiments are described in detail herein, with examples illustrated in the accompanying drawings. When the following description refers to the drawings, identical numerals in different drawings represent identical or similar elements unless otherwise indicated. The embodiments described in the following exemplary embodiments are not intended to represent all embodiments consistent with the present disclosure.
[0026] The method of exiting the target application in the embodiment of the present disclosure is described.
[0027] Figure 1 FIG. 1 is a flow chart showing a method for exiting an application according to an exemplary embodiment. Figure 1 As shown, in the embodiment of the present disclosure, a page of the target application corresponds to an activity. For example, the page played by the audio and video application corresponds to an activity played by the audio and video application. The activity has an activity cycle. When the user exits from the audio and video application to the desktop, the desktop will execute the exit animation of the current activity. After the exit animation is completed, the activity will execute the pause life cycle. The audio and video application will pause the audio and video during the pause life cycle of the playing activity. However, the animation will increase the time consumption during execution, which will result in a late pause life cycle of the playing activity, that is, the pause will not start until the exit animation is completed. Therefore, when the user exits from the audio and video application to the desktop, the sound of the audio and video application will be heard for a few seconds.
[0028] In the disclosed embodiment, when a user exits an audio or video application and returns to the desktop, the user automatically enters picture-in-picture mode, and a video is played in a small window in the lower right corner of the user's terminal desktop or elsewhere. Because the exit animation involves switching between the audio or video application and the desktop stack, and the terminal system does not support entering picture-in-picture mode during stack switching, it may not automatically enter picture-in-picture mode after the exit animation is executed.
[0029] In light of this, the present disclosure proposes an application control method. In one embodiment of the present disclosure, when an electronic device detects an application exit and executes an exit animation, the target application's pause lifecycle is triggered during the exit animation, thereby prematurely pausing audio playback and resolving the issue of audio lingering caused by continued audio playback after the application exits.
[0030] In one embodiment, the application involved in the embodiments of this disclosure is an application that supports audio playback. For example, it can be an application that plays videos or music, and this disclosure does not limit this. For ease of description, in the embodiments of this disclosure, the application that supports audio playback and performs voice control is referred to as the target application.
[0031] In the embodiments of the present disclosure, the electronic device can be understood as any device that can support the operation of the target application, for example, an electronic device such as a smart terminal.
[0032] Figure 2 FIG. 1 is a flow chart showing an application control method according to an exemplary embodiment. Figure 2 As shown, the method includes steps S11 to S12.
[0033] In step S11 , in response to the electronic device detecting that the target application exits and executes an exit animation, the pause lifecycle of the current interface display window of the target application is determined.
[0034] In the embodiment of the present disclosure, exiting the target application may be triggered based on a preset operation, such as a gesture operation for closing the application, such as a swipe-up operation.
[0035] In the embodiment of the present disclosure, in response to the electronic device detecting the exit of the target application, an exit animation is executed. The exit animation can be understood as an animation of exiting from the target application interface to the electronic device desktop interface, and the exit animation usually takes several seconds.
[0036] When the electronic device detects that the target application exits and executes the exit animation, determining the pause lifecycle of the current interface display window can be understood as determining that the Activity of the current target application interface will execute the pause lifecycle to ensure that the target application will pause its lifecycle during the pause lifecycle of the Activity playing on the current page.
[0037] In step S12, during the execution of the exit animation, the pause lifecycle of the target application is triggered.
[0038] In the embodiment of the present disclosure, during the execution of the exit animation, triggering the pause lifecycle of the target application can be understood as triggering the pause lifecycle of the current page Activity of the target application when the electronic device detects that the target application has exited and executes the exit animation, so as to achieve the audio pause of the application that supports audio playback.
[0039] In an embodiment of the present disclosure, in response to the electronic device detecting that the target application has exited and executing the exit animation, the pause lifecycle of the current interface display window of the target application is determined. During the execution of the exit animation, triggering the pause lifecycle of the target application can be achieved through an advance pause interface (setPauseAdvancd), or other interfaces that can implement this function, which is not limited in this disclosure. In an embodiment of the present disclosure, the pause lifecycle of the current page of the target application is triggered through the first interface, that is, the current page of the target application will pause the audio playback during the pause lifecycle.
[0040] In the embodiment of the present disclosure, the first interface is also used to record the application stack of the target application corresponding to this pause lifecycle, so as to avoid affecting the activity of the application when it is started next time. For example, when a user uses an electronic device and exits an application that supports audio playback, the system has triggered the pause lifecycle of the current page of the target application through the first interface. However, sometimes due to the user's fast operation, the user may click on the notification or automatically jump to the page in the background, causing the target application that the user exited to be re-called and returned to the interface at the time of exit. Therefore, when the pause lifecycle of the target application is triggered during the execution of the exit animation, the first interface will also record the application stack of the target application corresponding to this pause lifecycle, so as to avoid affecting the activity of the target application when it is started next time.
[0041] In the embodiment of the present disclosure, the electronic device detects the exit of the target application and executes the exit animation, thereby triggering the pause life cycle of the target application, thereby achieving the goal of the electronic device exiting the target application without leaving any sound.
[0042] In the embodiment of the present disclosure, before triggering the pause lifecycle of the target application, it is necessary to determine whether the pause condition is met.
[0043] In an embodiment of the present disclosure, before triggering the pause lifecycle of a target application, it is necessary to determine whether a pause condition is satisfied, and thus the pause lifecycle of the target application can be triggered through the first interface. The pause condition can be at least one of the following: the target application is not in multi-window mode and the target application is playing audio, or the target application is not in multi-window mode, or the target application is playing audio. The target application not being in multi-window mode can be understood as the target application not being in small window mode, or the target application not being in split-screen mode. If the user is in small window mode, then when the user attempts to trigger the target application to exit, the target application in small window mode will not exit. For example, if the user turns on the small window mode of the target application and swipes up on the electronic device screen, the small window mode of the target application remains on the electronic device screen. The target application playing audio can be understood as the target application supporting audio playback playing audio that is audible to the user. If the target application is playing audio but there is no sound, such as when it is muted, then when exiting the target application, there will not be a situation where the sound of the target application is heard 1-2 seconds after exiting the target application, or at other times.
[0044] In the embodiment of the present disclosure, before triggering the pause lifecycle of the target application, it is determined that the pause condition is met, and the first interface can be called to trigger the pause lifecycle of the target application during the execution of the exit animation, so as to avoid the situation where the sound of the target application is heard 1-2 seconds after exiting the target application, or at other times.
[0045] In an embodiment of the present disclosure, in response to the electronic device detecting that the target application exits and executes the exit animation, the electronic device will call an interface to make the target application enter the picture-in-picture mode, that is, after triggering the pause lifecycle of the target application, it determines to enter the picture-in-picture mode.
[0046] In an embodiment of the present disclosure, the first interface can also be used to set the current page of the target application to enter picture-in-picture mode when the stack is switched. In response to determining that during the execution of the exit animation, if it is determined that the pause lifecycle of the target application is triggered and the picture-in-picture mode needs to be executed, the current application stack of the target application executing the picture-in-picture is recorded. That is, if it is determined that the pause lifecycle of the target application is triggered and the picture-in-picture mode needs to be entered during the execution of the exit animation, the current application stack of the target application executing the picture-in-picture is recorded.
[0047] In an embodiment of the present disclosure, a picture-in-picture mode (enterPictureInPictureMode) interface can be called in an electronic device, or other interfaces that can implement this function, which is not limited in the present disclosure. In an embodiment of the present disclosure, in response to the electronic device detecting that the target application that supports audio playback exits and executes the exit animation, the pause lifecycle of the current interface display of the target application that supports audio playback is determined, and based on the first interface, the pause lifecycle of the target application is triggered during the execution of the exit animation. If it is determined that it is necessary to enter the picture-in-picture mode when the pause lifecycle of the target application is triggered, the second interface is called to record the current application stack of the target application executing the picture-in-picture. If it is determined that it is not necessary to enter the picture-in-picture mode when the pause lifecycle of the target application is triggered, there is no need to record the current application stack of the target application executing the picture-in-picture, and after the exit animation of the target application is completed, it successfully returns to the desktop.
[0048] In the embodiment of the present disclosure, based on determining that the picture-in-picture mode needs to be executed when the pause lifecycle of the target application is triggered, the current application stack of the target application executing the picture-in-picture is recorded, so that the target application can directly enter the picture-in-picture mode after the pause lifecycle, thereby improving the user's sense of use and experience.
[0049] In the disclosed embodiment, the picture-in-picture mode is entered based on the current application stack.
[0050] In an embodiment of the present disclosure, in response to the electronic device detecting that the target application exits and executes the exit animation, the pause lifecycle of the current interface display window of the target application is determined, and during the execution of the exit animation, the pause lifecycle of the target application is triggered. In response to determining that the picture-in-picture mode needs to be executed when the pause lifecycle of the target application is triggered, the current application stack of the target application executing the picture-in-picture is recorded. Based on triggering the pause lifecycle of the target application and determining that the picture-in-picture mode needs to be executed when the pause lifecycle of the target application is triggered, the exit animation is executed. And after executing the exit animation, if there is a recorded current application stack, the current application stack is called back to control the application to execute the picture-in-picture mode. That is, it is queried whether there is a recorded current application stack. If there is a recorded current application stack, the current application stack is called back to control the application to execute the picture-in-picture mode, so that the target application that supports audio playback directly enters the picture-in-picture mode after exiting.
[0051] In an embodiment of the present disclosure, it is queried whether there is a recorded current application stack. If there is a recorded current application stack, the callback of the current application stack can be achieved by resetting the early pause interface (unSetPauseAdvanced). It can also be other interfaces with the same function, which are not limited by the present disclosure. In response to the electronic device detecting that the target application exits and executes the exit animation, the pause lifecycle of the current interface display window of the target application is determined, and during the execution of the exit animation, the pause lifecycle of the target application is triggered. In response to determining that the picture-in-picture mode needs to be executed when the pause lifecycle of the target application is triggered, the current application stack of the target application executing the picture-in-picture is recorded. Based on triggering the pause lifecycle of the target application and determining that the picture-in-picture mode needs to be executed when the pause lifecycle of the target application is triggered, the exit animation is executed. After executing the exit animation, the third interface is called to query whether there is a recorded current application stack. If there is a recorded current application stack, the current application stack is called back to control the application to execute the picture-in-picture mode, so that the target application that supports audio playback directly enters the picture-in-picture mode after exiting. If there is no recorded current application stack based on the third interface query, after the exit animation is completed, the target application interface is directly returned to the desktop interface, and the sound of the target application interface will not remain on the desktop.
[0052] In the disclosed embodiment, based on querying the current application stack for existing records, the current application stack is called back to control the application to execute the picture-in-picture mode, thereby avoiding the problem of being unable to enter the picture-in-picture mode after the target application directly exits, and at the same time improving the user experience.
[0053] In the embodiment of the present disclosure, after executing the exit animation, the current application stack is cleared, that is, the application stack of the target application corresponding to this paused lifecycle recorded based on the setPauseAdvancd interface is cleared. Because the application stack of the target application corresponding to this paused lifecycle may be clicked on a notification or automatically jumped to a page in the background due to the user's fast operation, the target application exited by the user is re-called and returns to the interface at the time of exit. Therefore, in the setPauseAdvancd interface, after the paused lifecycle of the target application is triggered when executing the exit animation process, the application stack of the target application corresponding to this paused lifecycle is recorded, and after the exit animation is completed, the application stack of the target application corresponding to this paused lifecycle is cleared. This is to avoid the application stack of the target application corresponding to the paused lifecycle from being re-displayed, and to avoid the next startup of the target application's Activity being affected.
[0054] In the disclosed embodiment, clearing the current application stack after executing the exit animation can also be achieved through the unSetPauseAdvanced interface. That is, in the setPauseAdvancd interface, after the target application's pause lifecycle is triggered during the exit animation process, the target application's application stack corresponding to this pause lifecycle is recorded. After the exit animation is completed, the electronic device calls the unSetPauseAdvanced interface to clear the target application's application stack corresponding to this pause lifecycle. This prevents the target application's application stack corresponding to the pause lifecycle from being re-displayed and prevents the next launch of the target application's activity from being affected.
[0055] In the disclosed embodiment, the current application stack is cleared after the exit animation is executed, thereby preventing the application stack of the target application corresponding to the paused lifecycle from being redisplayed and avoiding other impacts, thereby improving the user experience.
[0056] In an embodiment of the present disclosure, in response to the electronic device detecting that the target application has exited and executing the exit animation, the pause lifecycle of the current interface display window of the target application is determined. During the execution of the exit animation, triggering the pause lifecycle of the target application can be achieved through the setPauseAdvancd interface. The setPauseAdvancd interface is also used to record the application stack of the target application corresponding to this pause lifecycle to avoid affecting the next time the activity of the application is started. For example, when a user uses an electronic device and exits an application that supports audio playback, the system has triggered the pause lifecycle of the current page of the target application through the setPauseAdvancd interface. However, sometimes due to the user's fast operation, a notification may be clicked or the page may be automatically jumped in the background, causing the target application that the user exited to be re-called and returned to the interface at the time of exit. Therefore, during the execution of the exit animation, when the pause lifecycle of the target application is triggered, the setPauseAdvancd interface will also record the application stack of the target application corresponding to this pause lifecycle to avoid affecting the next time the activity of the target application is started. The setPauseAdvancd interface can also be used to set the current page of the target application to enter picture-in-picture mode when the stack is switched. That is, if the target application's pause lifecycle is triggered during the execution of the exit animation and the target application needs to enter the picture-in-picture mode, the current application stack of the target application executing the picture-in-picture mode is recorded. Furthermore, the interface that implements the above function can also be other interfaces that can implement this function.
[0057] In an embodiment of the present disclosure, in response to the electronic device detecting that the target application supporting audio playback exits and executes the exit animation, the pause lifecycle of the current interface display of the target application supporting audio playback is determined, and based on the setPauseAdvancd interface, the pause lifecycle of the target application is triggered during the execution of the exit animation. If it is determined that it is necessary to enter the picture-in-picture mode when the pause lifecycle of the target application is triggered, the enterPictureInPictureMode interface is called to record the current application stack of the target application executing the picture-in-picture. If it is determined that it is not necessary to enter the picture-in-picture mode when the pause lifecycle of the target application is triggered, there is no need to record the current application stack of the target application executing the picture-in-picture, and after the exit animation of the target application is completed, it successfully returns to the desktop. Among them, the interface that implements the above function may also be other interfaces that can implement this function, and the present disclosure does not limit it here.
[0058] In an embodiment of the present disclosure, in response to determining that the picture-in-picture mode needs to be executed when the pause lifecycle of the target application is triggered, the current application stack of the target application executing the picture-in-picture is recorded. Based on triggering the pause lifecycle of the target application and determining that the picture-in-picture mode needs to be executed when the pause lifecycle of the target application is triggered, the exit animation is executed. After executing the exit animation, the unSetPauseAdvanced interface is called to query whether there is a recorded current application stack. If there is a recorded current application stack, the current application stack is called back to control the application to execute the picture-in-picture mode, so that the target application that supports audio playback directly enters the picture-in-picture mode after exiting. If there is no recorded current application stack based on the query of the unSetPauseAdvanced interface, then after the exit animation is completed, it directly returns to the desktop interface from the target application interface, and the sound of the target application interface will not stay on the desktop. Among them, the interface that implements the above functions can also be other interfaces with the same functions, and the present disclosure does not limit it here.
[0059] The following embodiments of the present disclosure illustrate the application control method involved in the present disclosure with reference to examples.
[0060] Figure 3 FIG. 1 is a flow chart showing an application control method according to an exemplary embodiment. Figure 3 As shown, the method includes the following.
[0061] In the embodiment of the present disclosure, the terminal system provides two interfaces for the desktop application. After the terminal detects that the user triggers the instruction to exit the application, the terminal application starts to execute the exit animation. At this time, the setPauseAdvanced interface is called to trigger the pause lifecycle of the activity. The application in the pause state will pause its operation and playback. At the same time, the application stack of the early pause is recorded in the setPauseAdvanced interface to prevent the Activity from being redisplayed the next time the application is started.
[0062] In the disclosed embodiment, the desktop application needs to determine whether the pause condition is met before exiting the animation execution. If the pause condition is met, the setPauseAdvaned interface is called to make the application pause in advance and pause the playback of the application, for example, pausing the playback of audio and video applications. The pause condition can be that the application is playing audio and is not in multi-window mode, so as to avoid the application being in a silent state, consuming resources by following the optimization logic, and not going out of other modes such as split screen and small window mode. After determining that the pause condition is met, the playback of the application is paused to determine whether it is necessary to enter the picture-in-picture mode. If it is necessary to enter the picture-in-picture mode, it is determined in enterPictureInPictureMode whether it is an application page that is paused in advance. If it is a playback page that is paused in advance, the picture-in-picture process is not executed immediately, but the picture-in-picture process of the currently playing Activity is recorded.
[0063] In the disclosed embodiment, based on the fact that the picture-in-picture process of the current Activity has been recorded and the exit animation is completed, unSetPauseAdvanced is called to check whether there is a recorded picture-in-picture implementation process. If there is a picture-in-picture process, the current application interface enters the picture-in-picture mode, and the App stack that records the early pause in setPauseAdvanced is cleared.
[0064] In this disclosed embodiment, by triggering the pause lifecycle of the target application during animation execution, the scope of sound retention optimization is expanded, while retaining the function of some applications automatically entering picture-in-picture mode. At the same time, it avoids the logic of prematurely pausing the application when it is not playing audio, thus avoiding resource consumption and other impacts.
[0065] Based on the same concept, the embodiment of the present disclosure further provides an application control device 100 .
[0066] It is understandable that the application control device 100 provided in the embodiment of the present disclosure includes hardware structures and / or software modules corresponding to the execution of each function in order to realize the above functions. In combination with the units and algorithm steps of the various examples disclosed in the embodiment of the present disclosure, the embodiment of the present disclosure can be implemented in the form of hardware or a combination of hardware and computer software. Whether a function is executed in the form of hardware or computer software driving hardware depends on the specific application and design constraints of the technical solution. Those skilled in the art can use different methods to implement the described functions for each specific application, but such implementation should not be considered to exceed the scope of the technical solution of the embodiment of the present disclosure.
[0067] Figure 4 FIG. 1 is a block diagram of an application control device 100 according to an exemplary embodiment. Figure 4 The device includes a determining unit 101 and a processing unit 102.
[0068] The determination unit 101 is used to determine the pause lifecycle of the current interface display window of the target application in response to the electronic device detecting that the target application exits and executes the exit animation. The target application is an application that supports audio playback, and the pause lifecycle is used to pause the audio playback of the target application.
[0069] The processing unit 102 is configured to trigger the pause lifecycle of the target application during the execution of the exit animation.
[0070] In one embodiment, before triggering the pause lifecycle of the target application, the determining unit 101 is further configured to: determine whether a pause condition is satisfied, where the pause condition includes at least one of the following: the target application is not in multi-window mode; the target application is playing audio.
[0071] In one embodiment, the determining unit 101 is further configured to: in response to determining that the picture-in-picture mode needs to be executed when the pause lifecycle of the target application is triggered, record a current application stack of the target application executing the picture-in-picture mode.
[0072] In one embodiment, the processing unit 102 is further configured to: after executing the exit animation, if there is a recorded current application stack, call back the current application stack to control the application to execute the picture-in-picture mode.
[0073] In one implementation, the processing unit 102 is further configured to clear the current application stack after executing the exit animation.
[0074] Regarding the apparatus in the above embodiment, the specific manner in which each module performs operations has been described in detail in the embodiment of the method, and will not be elaborated here. Figure 5FIG2 is a block diagram illustrating an apparatus 200 for application control according to an exemplary embodiment. The apparatus 200 may be provided as a terminal. For example, the apparatus 200 may be a mobile phone, a computer, a digital broadcast terminal, a messaging device, a game console, a tablet device, a medical device, a fitness device, a personal digital assistant, etc.
[0075] Reference Figure 5 , apparatus 200 may include one or more of the following components: a processing component 202 , a memory 204 , a power component 206 , a multimedia component 208 , an audio component 210 , an input / output (I / O) interface 212 , a sensor component 214 , and a communication component 216 .
[0076] The processing component 202 generally controls the overall operation of the device 200, such as operations associated with display, phone calls, data communications, camera operation, and recording operations. The processing component 202 may include one or more processors 220 to execute instructions to perform all or part of the steps of the above-described method. In addition, the processing component 202 may include one or more modules to facilitate interaction between the processing component 202 and other components. For example, the processing component 202 may include a multimedia module to facilitate interaction between the multimedia component 208 and the processing component 202.
[0077] The memory 204 is configured to store various types of data to support operations on the device 200. Examples of such data include instructions for any application or method operating on the device 200, contact data, phone book data, messages, pictures, videos, etc. The memory 204 can be implemented by any type of volatile or non-volatile storage device, or a combination thereof, such as static random access memory (SRAM), electrically erasable programmable read-only memory (EEPROM), erasable programmable read-only memory (EPROM), programmable read-only memory (PROM), read-only memory (ROM), magnetic memory, flash memory, magnetic disk, or optical disk.
[0078] The power component 206 provides power to the various components of the device 200. The power component 206 may include a power management system, one or more power supplies, and other components associated with generating, managing, and distributing power to the device 200.
[0079] The multimedia component 208 includes a screen that provides an output interface between the device 200 and the user. In some embodiments, the screen may include a liquid crystal display (LCD) and a touch panel (TP). If the screen includes a touch panel, the screen can be implemented as a touch screen to receive input signals from the user. The touch panel includes one or more touch sensors to sense touches, slides, and gestures on the touch panel. The touch sensor can not only sense the boundaries of the touch or slide action, but also detect the duration and pressure associated with the touch or slide operation. In some embodiments, the multimedia component 208 includes a front camera and / or a rear camera. When the device 200 is in an operating mode, such as a shooting mode or a video mode, the front camera and / or the rear camera can receive external multimedia data. Each front camera and rear camera can be a fixed optical lens system or have a focal length and optical zoom capability.
[0080] The audio component 210 is configured to output and / or input audio signals. For example, the audio component 210 includes a microphone (MIC) that is configured to receive external audio signals when the device 200 is in an operating mode, such as a call mode, a recording mode, and a voice recognition mode. The received audio signals may be further stored in the memory 204 or transmitted via the communication component 216. In some embodiments, the audio component 210 further includes a speaker for outputting audio signals.
[0081] I / O interface 212 provides an interface between processing component 202 and peripheral interface modules, such as a keyboard, click wheel, buttons, etc. These buttons may include but are not limited to: a home button, volume buttons, a start button, and a lock button.
[0082] The sensor assembly 214 includes one or more sensors for providing various aspects of the status assessment of the device 200. For example, the sensor assembly 214 can detect the open / closed state of the device 200, the relative positioning of components, such as the display and keypad of the device 200. The sensor assembly 214 can also detect changes in the position of the device 200 or a component of the device 200, the presence or absence of user contact with the device 200, the orientation or acceleration / deceleration of the device 200, and temperature changes of the device 200. The sensor assembly 214 may include a proximity sensor configured to detect the presence of nearby objects without any physical contact. The sensor assembly 214 may also include an optical sensor, such as a CMOS or CCD image sensor, for use in imaging applications. In some embodiments, the sensor assembly 214 may also include an accelerometer, a gyroscope sensor, a magnetic sensor, a pressure sensor, or a temperature sensor.
[0083] The communication component 216 is configured to facilitate wired or wireless communication between the device 200 and other devices. The device 200 can access a wireless network based on a communication standard, such as WiFi, 2G or 3G, or a combination thereof. In an exemplary embodiment, the communication component 216 receives a broadcast signal or broadcast-related information from an external broadcast management system via a broadcast channel. In an exemplary embodiment, the communication component 216 also includes a near field communication (NFC) module to facilitate short-range communication. For example, the NFC module can be implemented based on radio frequency identification (RFID) technology, infrared data association (IrDA) technology, ultra-wideband (UWB) technology, Bluetooth (BT) technology and other technologies.
[0084] In an exemplary embodiment, the apparatus 200 may be implemented by one or more application-specific integrated circuits (ASICs), digital signal processors (DSPs), digital signal processing devices (DSPDs), programmable logic devices (PLDs), field programmable gate arrays (FPGAs), controllers, microcontrollers, microprocessors, or other electronic components to perform the above-described method.
[0085] In an exemplary embodiment, a non-transitory computer-readable storage medium including instructions is also provided, such as the memory 204 including instructions, which can be executed by the processor 220 of the apparatus 200 to perform the above method. For example, the non-transitory computer-readable storage medium can be a ROM, a random access memory (RAM), a CD-ROM, a magnetic tape, a floppy disk, an optical data storage device, etc.
[0086] Figure 6 3 is a block diagram of an apparatus 300 for application control according to an exemplary embodiment. For example, the apparatus 300 may be provided as a server. Figure 6 Apparatus 300 includes a processing component 322, which further includes one or more processors, and memory resources represented by memory 332 for storing instructions, such as applications, that can be executed by processing component 322. The applications stored in memory 332 may include one or more modules, each corresponding to a set of instructions. Furthermore, processing component 322 is configured to execute the instructions to perform the above-described method...
[0087] The device 300 may also include a power supply component 326 configured to perform power management of the device 300, a wired or wireless network interface 350 configured to connect the device 300 to a network, and an input / output (I / O) interface 358. The device 300 may operate based on an operating system stored in the memory 332, such as Windows Server™, Mac OS X™, Unix™, Linux™, FreeBSD™, or the like.
[0088] It is understood that in this disclosure, "plurality" refers to two or more than two, and other quantifiers are similar. "And / or" describes the association relationship of related objects, indicating that three relationships may exist. For example, A and / or B can mean: A exists alone, A and B exist at the same time, and B exists alone. The character " / " generally indicates that the related objects before and after are in an "or" relationship. The singular forms "a", "the" and "the" are also intended to include the plural forms, unless the context clearly indicates otherwise.
[0089] It will be further understood that the terms "first," "second," and the like are used to describe various types of information, but such information should not be limited to these terms. These terms are used solely to distinguish information of the same type from one another and do not indicate a particular order or level of importance. In fact, the terms "first," "second," and the like are fully interchangeable. For example, first information could be referred to as second information, and similarly, second information could be referred to as first information without departing from the scope of this disclosure.
[0090] It can be further understood that the terms "center", "longitudinal", "lateral", "front", "back", "up", "down", "left", "right", "vertical", "horizontal", "top", "bottom", "inside", "outside", etc., indicating the orientation or position relationship, are based on the orientation or position relationship shown in the accompanying drawings, and are only for the convenience of describing this embodiment and simplifying the description, and do not indicate or imply that the device or element referred to must have a specific orientation, be constructed and operate in a specific orientation.
[0091] It is further understood that, unless otherwise specified, “connection” includes a direct connection where there are no other components between the two elements, and also includes an indirect connection where there are other elements between the two elements.
[0092] It is further understood that although operations are described in a particular order in the drawings in the embodiments of the present disclosure, this should not be construed as requiring that the operations be performed in the particular order shown or in a serial order, or that all of the operations shown be performed to obtain the desired results. In certain circumstances, multitasking and parallel processing may be advantageous.
[0093] Other embodiments of the present disclosure will readily occur to those skilled in the art after considering the specification and practicing the invention disclosed herein. This disclosure is intended to cover any variations, uses, or adaptations of the present disclosure that follow the general principles of this disclosure and include common knowledge or customary techniques in the art not disclosed herein.
[0094] It should be understood that the present disclosure is not limited to the exact structures described above and shown in the drawings, and that various modifications and changes may be made without departing from the scope thereof. The scope of the present disclosure is limited only by the scope of the appended claims.
Claims
1. An application control method, characterized in that: include: In response to the electronic device detecting that a target application exits and executes an exit animation, determining a pause lifecycle of a current interface display window of the target application, the target application being an application that supports audio playback, and the pause lifecycle being used to pause playback of audio of the target application; During the execution of the exit animation, the pause lifecycle of the target application is triggered.
2. The method according to claim 1, characterized in that Before triggering the suspension lifecycle of the target application, the method further includes: Determining that a suspension condition is satisfied, the suspension condition comprising at least one of the following: The target application is not in multi-window mode; The target application plays audio.
3. The method according to claim 1, characterized in that The method further comprises: In response to determining that a picture-in-picture mode needs to be executed when the pause lifecycle of the target application is triggered, a current application stack of the target application executing the picture-in-picture mode is recorded.
4. The method according to claim 3, characterized in that The method further comprises: After executing the exit animation, if the current application stack is recorded, the current application stack is called back to control the application to execute the picture-in-picture mode.
5. The method according to claim 3 or 4, characterized in that The method further comprises: The current application stack is cleared after executing the exit animation.
6. An application control device, characterized in that: include: a determining unit, configured to determine, in response to the electronic device detecting that a target application exits and executes an exit animation, a pause lifecycle of a current interface display window of the target application, wherein the target application is an application that supports audio playback, and the pause lifecycle is used to pause playback of audio of the target application; The processing unit is used to trigger the pause life cycle of the target application during the execution of the exit animation.
7. The device according to claim 6, characterized in that Before triggering the pause lifecycle of the target application, the determining unit is further configured to: Determining that a suspension condition is satisfied, the suspension condition comprising at least one of the following: The target application is not in multi-window mode; The target application plays audio.
8. The device according to claim 6, characterized in that The determining unit is further configured to: In response to determining that a picture-in-picture mode needs to be executed when the pause lifecycle of the target application is triggered, a current application stack of the target application executing the picture-in-picture mode is recorded.
9. The device according to claim 8, characterized in that The processing unit is further configured to: After executing the exit animation, if the current application stack is recorded, the current application stack is called back to control the application to execute the picture-in-picture mode.
10. The device according to claim 8 or 9, characterized in that The processing unit is further configured to: The current application stack is cleared after executing the exit animation.
11. An electronic device, characterized in that: include: processor: a memory for storing processor-executable instructions; The processor is configured to execute the application control method according to any one of claims 1 to 5.
12. A storage medium, characterized in that: The storage medium stores instructions, and when the instructions in the storage medium are executed by a processor, the processor is enabled to execute the application control method according to any one of claims 1 to 5.