Disclosure of Invention
The embodiment of the application aims to provide an application program operation control method and device, which are used for solving the technical problem of complicated operation in the prior art.
In order to solve the technical problems, the application is realized as follows:
In a first aspect, an embodiment of the present application provides a method for controlling operation of an application, where the method includes:
Receiving a first operation aiming at a target application program, and acquiring a first operation parameter of the first operation, wherein the first operation is used for triggering the electronic equipment to be switched to a system desktop by the target application program, and the first operation comprises the following steps: an operation triggered by a navigation gesture or an operation triggered by a navigation key, the first operation parameter including a duration of a press;
Determining whether the pressing time length reaches a preset time length, if so, displaying a first area and a second area on a screen;
Receiving a second operation for the screen area, and acquiring a second operation parameter of the second operation, wherein the second operation parameter comprises: an operation area and an operation type;
and determining whether the target application program is still running in the background after switching to the system desktop according to the second operation parameter.
Optionally, as an embodiment, the determining, according to the second operation parameter, whether the target application program is still running in the background after switching to the system desktop includes:
When the second operation is an operation of sliding to the first area, determining to close the target application program after switching to a system desktop;
and when the second operation is the operation of sliding to the second area, determining to run the target application program in the background after switching to the system desktop.
Optionally, as an embodiment, the method further includes:
And if the pressing time is lower than the preset time, determining to close the target application program after switching to the system desktop.
Optionally, as an embodiment, the first area is a left half area of the screen, and the second area is a right half area of the screen; or alternatively
The first area is the upper half area of the screen, and the second area is the lower half area of the screen.
Optionally, as an embodiment, a prompt is displayed on the first area and the second area, where the prompt is used to indicate a correspondence between a user operation and an operation mode of the target application after switching to a system desktop.
In a second aspect, an embodiment of the present application provides an apparatus for controlling operation of an application program, including:
The first receiving module is configured to receive a first operation for a target application program, where the first operation is configured to trigger the electronic device to switch from the target application program to a system desktop, and the first operation includes: an operation triggered by a navigation gesture or an operation triggered by a navigation key;
a first obtaining module, configured to obtain a first operation parameter of the first operation, where the first operation parameter includes a pressing duration;
The first determining module is used for determining whether the pressing duration reaches a preset duration;
the display module is used for displaying a first area and a second area on a screen when the determination result of the first determination module is yes;
A second receiving module for receiving a second operation for the screen area;
A second obtaining module, configured to obtain a second operation parameter of the second operation, where the second operation parameter includes: an operation area and an operation type;
And the second determining module is used for determining whether the target application program is still operated in the background after being switched to the system desktop according to the second operation parameter.
Optionally, as an embodiment, the second determining module includes:
The first determining submodule is used for determining to close the target application program after switching to the system desktop when the second operation is an operation of sliding to the first area;
And the second determining submodule is used for determining that the target application program is still operated in the background after the system desktop is switched to when the second operation is the operation of sliding to the second area.
Optionally, as an embodiment, the apparatus further includes:
And the third determining module is used for determining to close the target application program after switching to the system desktop under the condition that the determination result of the first determining module is NO.
Optionally, as an embodiment, the first area is a left half area of the screen, and the second area is a right half area of the screen; or alternatively
The first area is the upper half area of the screen, and the second area is the lower half area of the screen.
Optionally, as an embodiment, a prompt is displayed on the first area and the second area, where the prompt is used to indicate a correspondence between a user operation and an operation mode of the target application after switching to a system desktop.
In a third aspect, an embodiment of the present application provides an electronic device, including a processor, a memory, and a program or an instruction stored on the memory and executable on the processor, where the program or the instruction implements the steps of the method for controlling the operation of an application program according to the first aspect when executed by the processor.
In a fourth aspect, an embodiment of the present application provides a readable storage medium, on which a program or an instruction is stored, which when executed by a processor, implements the steps of the method for controlling the operation of an application program according to the first aspect.
In a fifth aspect, an embodiment of the present application provides a chip, where the chip includes a processor and a communication interface, where the communication interface is coupled to the processor, and the processor is configured to execute a program or instructions, and implement the method for controlling operation of an application program according to the first aspect.
In the embodiment of the application, when receiving the first operation for triggering the electronic equipment to be switched from the target application program to the system desktop, the pressing time length of the first operation can be obtained, the pressing time length of the first operation is determined to reach the preset time length, and the first area and the second area are displayed on the screen; and then receiving a second operation aiming at the screen area, acquiring an operation area and an operation type of the second operation, and determining whether the target application program is still operated in the background after switching to the system desktop according to the operation area and the operation type of the second operation. Compared with the prior art, in the embodiment of the application, when the user exits the application program and switches to the system desktop, the user can select whether to keep the background operation of the application program or not by simply adjusting the pressing time of the exit operation and simply operating the area displayed on the screen, so that the operation is simple and quick.
Detailed Description
The following description of the embodiments of the present application will be made clearly and fully with reference to the accompanying drawings, in which it is evident that the embodiments described are some, but not all embodiments of the application. All other embodiments, which can be made by those skilled in the art based on the embodiments of the application without making any inventive effort, are intended to be within the scope of the application.
The terms first, second and the like in the description and in the claims, are used for distinguishing between similar elements and not necessarily for describing a particular sequential or chronological order. It is to be understood that the data so used may be interchanged, as appropriate, such that embodiments of the present application may be implemented in sequences other than those illustrated or described herein, and that the objects identified by "first," "second," etc. are generally of a type, and are not limited to the number of objects, such as the first object may be one or more. Furthermore, in the description and claims, "and/or" means at least one of the connected objects, and the character "/", generally means that the associated object is an "or" relationship.
The embodiment of the application provides an application program running control method and device.
The following describes in detail an operation control method of an application program provided by the embodiment of the present application through a specific embodiment and an application scenario thereof with reference to the accompanying drawings.
It should be noted that, the method for controlling the operation of the application program provided in the embodiment of the present application is applicable to an electronic device, and in practical application, the electronic device may include: mobile terminals such as smartphones, tablet computers, personal digital assistants, etc., the embodiments of the present application are not limited thereto.
Fig. 1 is a flowchart of a method for controlling operation of an application program according to an embodiment of the present application, as shown in fig. 1, the method may include the following steps: step 101, step 102, step 103 and step 104, wherein,
In step 101, a first operation for a target application program is received, and a first operation parameter of the first operation is acquired, where the first operation is used to trigger the electronic device to switch from the target application program to a system desktop, and the first operation includes: the first operating parameter includes a duration of the press by an operation triggered by a navigation gesture or by an operation triggered by a navigation key.
In the embodiment of the application, the target application program can be any application program installed in the electronic equipment; or the target application may be a specific type of application installed in the electronic device; or the target application may be a user-specified application installed in the electronic device, which is not limited by the embodiment of the present application.
In the embodiment of the application, when the electronic equipment supports the user to use the navigation gesture and slide back to the system desktop through the bottom, the first operation is an operation triggered by the navigation gesture, and specifically, the first operation is an upward sliding operation taking the bottom of the screen of the electronic equipment as a starting position.
In the embodiment of the application, when the electronic device supports the user to return to the system desktop by using the navigation key, for example, the home key, the first operation is an operation triggered by the navigation key, and specifically, the first operation is an operation of pressing the navigation key.
In step 102, it is determined whether the pressing duration reaches a preset duration, and if so, the first area and the second area are displayed on the screen.
In the embodiment of the application, when the electronic equipment supports the user to use the navigation gesture and returns to the desktop of the system through the upward sliding of the bottom, whether the pressing duration of the first operation reaches the preset duration is determined, and whether the user immediately loosens the hand is actually determined when the user slides up from the bottom of the screen. At this time, the user has a wish to exit the application program and return to the desktop of the system, i.e. different responses are performed according to whether the user immediately releases his hands.
In the embodiment of the application, when the electronic equipment supports the user to return to the system desktop by using the navigation key, for example, the home key, whether the pressing duration of the first operation reaches the preset duration is determined, and whether the user immediately loosens the hand is actually determined when the user clicks the navigation key. At this time, the user has a wish to exit the application program and return to the desktop of the system, i.e. different responses are performed according to whether the user immediately releases his hands.
In the embodiment of the application, if the pressing time reaches the preset time, the user is not released, and two areas, namely a first area and a second area, are displayed on the screen of the electronic equipment. If the pressing time is lower than the preset time, the user immediately loosens the hand, and the target application program is closed after switching to the system desktop is determined.
In the embodiment of the application, the positions of the first area and the second area can be determined according to the behavior habit of the user or the setting of the user, and then the first area and the second area are displayed on a screen. In practical application, the first area may be a left half area of the screen, and the second area is a right half area of the screen; or the first area is the upper half area of the screen, and the second area is the lower half area of the screen.
In the embodiment of the application, the first area and the second area are displayed with prompt, wherein the prompt is used for indicating the corresponding relation between the user operation and the operation mode of the target application program after switching to the system desktop.
In one example, as shown in fig. 2, the electronic device 20 supports the user to return to the system desktop by sliding up the bottom using a navigation gesture, and when the pressing duration of the first operation of the user reaches the preset duration, a first area 21 and a second area 22 are displayed on the screen of the electronic device 20, the first area 21 displays a prompt of "finger moves to this area and closes the background operation", and the second area 22 displays a prompt of "finger moves to this area and reserves the background operation".
In another example, as shown in fig. 3, the electronic device 30 supports the user to return to the system desktop using the navigation key, and when the pressing duration of the first operation of the user reaches the preset duration, a first area 31 and a second area 32 are displayed on the screen of the electronic device 30, the first area 31 is displayed with the prompt "finger moves to this area, the background operation is closed", and the second area 32 is displayed with the prompt "finger moves to this area, and the background operation is reserved.
In step 103, a second operation for the screen area is received, and a second operation parameter of the second operation is acquired, wherein the second operation parameter includes: an operation area and an operation type.
In the embodiment of the present application, the purpose of obtaining the second operation parameter of the second operation is: determining whether the second operation is triggered in the first area or the second area, and determining whether the operation type of the second operation is a sliding operation, a clicking operation, a long-press operation, or the like.
In step 104, it is determined whether the target application is still running in the background after switching to the system desktop, based on the second operating parameter.
In one embodiment of the present application, the step 104 may specifically include the following steps:
when the second operation is the operation of sliding to the first area, namely the operation area of the second operation is the first area, and when the operation type is the sliding operation, determining to close the target application program after switching to the system desktop;
when the second operation is the operation of sliding to the second area, that is, the operation area of the second operation is the second area, and when the operation type is the sliding operation, it is determined that the target application program is still operated in the background after switching to the system desktop.
In one example, when the electronic device supports the user to return to the system desktop by sliding up the bottom using a navigation gesture, the user has a desire to exit the application to return to the system desktop at this point, i.e., a different response is made depending on whether the user is immediately released. Specifically, if the user immediately releases his hand, the background operation of the application program is not reserved and the system desktop is returned. If the user does not immediately loosen the hands, a left area and a right area are displayed on the screen, and prompt languages are generated in the left area and the right area respectively. As shown in fig. 2, if the user slides the finger to the left area, the application is not left running in the background and returns to the system desktop. If the user slides the finger to the right area, the application program is kept running in the background and returned to the system desktop, for example, the video application keeps the video to continue playing, the downloading application continues in the background downloading, and the like, and simultaneously the system desktop is returned.
In another example, when the electronic device supports the user to return to the system desktop using the navigation key, the user clicks the navigation key. At this time, the user has a wish to exit the application program and return to the desktop of the system, i.e. different responses are performed according to whether the user immediately releases his hands. Specifically, if the user releases his hand immediately after clicking the navigation key, the background operation of the application program is not reserved and the system desktop is returned. If the user does not immediately loose hands after clicking the navigation key, displaying a left area and a right area on the screen, and generating prompt languages in the left area and the right area respectively. As shown in fig. 3, if the user slides the finger to the left area, the application is not left running in the background and returns to the system desktop. If the user slides the finger to the right area, the application program is kept running in the background and returned to the system desktop, for example, the video application keeps the video to continue playing, the downloading application continues in the background downloading, and the like, and simultaneously the system desktop is returned.
Therefore, in the embodiment of the application, when the user returns to the system desktop from the application program by using the navigation gesture or the navigation key, whether the background operation of the application program is kept can be quickly selected through long-press and sliding operation, so that the operation is convenient and quick, and the user experience is improved.
As can be seen from the foregoing embodiments, in this embodiment, when a first operation for triggering the electronic device to switch from the target application to the system desktop is received, a pressing duration of the first operation may be obtained, and it is determined that the pressing duration of the first operation reaches a preset duration, and a first area and a second area are displayed on a screen; and then receiving a second operation aiming at the screen area, acquiring an operation area and an operation type of the second operation, and determining whether the target application program is still operated in the background after switching to the system desktop according to the operation area and the operation type of the second operation. Compared with the prior art, in the embodiment of the application, when the user exits the application program and switches to the system desktop, the user can select whether to keep the background operation of the application program or not by simply adjusting the pressing time of the exit operation and simply operating the area displayed on the screen, so that the operation is simple and quick.
It should be noted that, in the method for controlling operation of an application program according to the embodiment of the present application, the execution body may be an operation control device of the application program, or a control module in the operation control device of the application program for executing the operation control method for loading the application program. In the embodiment of the present application, an operation control method for executing and loading an application program by using an operation control device for an application program is taken as an example, and the operation control device for an application program provided in the embodiment of the present application is described.
Fig. 4 is a block diagram of an apparatus for controlling operation of an application according to an embodiment of the present application, and as shown in fig. 4, an apparatus 400 for controlling operation of an application may include: a first receiving module 401, a first acquiring module 402, a first determining module 403, a display module 404, a second receiving module 405, a second acquiring module 406 and a second determining module 407, wherein,
A first receiving module 401, configured to receive a first operation for a target application program, where the first operation is used to trigger the electronic device to switch from the target application program to a system desktop, and the first operation includes: an operation triggered by a navigation gesture or an operation triggered by a navigation key;
A first obtaining module 402, configured to obtain a first operation parameter of the first operation, where the first operation parameter includes a pressing duration;
A first determining module 403, configured to determine whether the pressing duration reaches a preset duration;
a display module 404, configured to display a first area and a second area on a screen if the determination result of the first determination module is yes;
A second receiving module 405, configured to receive a second operation for the screen area;
A second obtaining module 406, configured to obtain a second operation parameter of the second operation, where the second operation parameter includes: an operation area and an operation type;
A second determining module 407, configured to determine whether the target application is still running in the background after switching to the system desktop according to the second operation parameter.
As can be seen from the foregoing embodiments, in this embodiment, when a first operation for triggering the electronic device to switch from the target application to the system desktop is received, a pressing duration of the first operation may be obtained, and it is determined that the pressing duration of the first operation reaches a preset duration, and a first area and a second area are displayed on a screen; and then receiving a second operation aiming at the screen area, acquiring an operation area and an operation type of the second operation, and determining whether the target application program is still operated in the background after switching to the system desktop according to the operation area and the operation type of the second operation. Compared with the prior art, in the embodiment of the application, when the user exits the application program and switches to the system desktop, the user can select whether to keep the background operation of the application program or not by simply adjusting the pressing time of the exit operation and simply operating the area displayed on the screen, so that the operation is simple and quick.
Alternatively, as an embodiment, the second determining module 407 may include:
The first determining submodule is used for determining to close the target application program after switching to the system desktop when the second operation is an operation of sliding to the first area;
And the second determining submodule is used for determining that the target application program is still operated in the background after the system desktop is switched to when the second operation is the operation of sliding to the second area.
Optionally, as an embodiment, the operation control device 400 of the application program may further include:
And the third determining module is used for determining to close the target application program after switching to the system desktop under the condition that the determination result of the first determining module is NO.
Optionally, as an embodiment, the first area is a left half area of the screen, and the second area is a right half area of the screen; or alternatively
The first area is the upper half area of the screen, and the second area is the lower half area of the screen.
Optionally, as an embodiment, a prompt is displayed on the first area and the second area, where the prompt is used to indicate a correspondence between a user operation and an operation mode of the target application after switching to a system desktop.
The operation control device of the application program in the embodiment of the application can be a device, and can also be a component, an integrated circuit or a chip in the terminal. The device may be a mobile electronic device or a non-mobile electronic device. By way of example, the mobile electronic device may be a mobile phone, a tablet computer, a notebook computer, a palm computer, a vehicle-mounted electronic device, a wearable device, an ultra-mobile personal computer (UMPC), a netbook or a Personal Digital Assistant (PDA), etc., and the non-mobile electronic device may be a server, a network attached storage (Network Attached Storage, NAS), a personal computer (personal computer, PC), a Television (TV), a teller machine, a self-service machine, etc., and the embodiments of the present application are not limited in particular.
The operation control device of the application program in the embodiment of the present application may be a device having an operating system. The operating system may be an Android operating system, an iOS operating system, or other possible operating systems, and the embodiment of the present application is not limited specifically.
The running control device for the application program provided by the embodiment of the present application can implement each process implemented by the embodiment of the method of fig. 1, and in order to avoid repetition, a detailed description is omitted here.
Optionally, as shown in fig. 5, an embodiment of the present application further provides an electronic device 500, including a processor 501, a memory 502, and a program or an instruction stored in the memory 502 and capable of being executed on the processor 501, where the program or the instruction implements each process of the above embodiment of the operation control method of the application program when executed by the processor 501, and the process can achieve the same technical effect, and for avoiding repetition, a detailed description is omitted herein.
The electronic device in the embodiment of the application includes the mobile electronic device and the non-mobile electronic device.
Fig. 6 is a schematic diagram of a hardware structure of an electronic device implementing an embodiment of the present application. The electronic device 600 includes, but is not limited to: radio frequency unit 601, network module 602, audio output unit 603, input unit 604, sensor 605, display unit 606, user input unit 607, interface unit 608, memory 609, and processor 610.
Those skilled in the art will appreciate that the electronic device 600 may further include a power source (e.g., a battery) for powering the various components, which may be logically connected to the processor 610 by a power management system to perform functions such as managing charge, discharge, and power consumption by the power management system. The electronic device structure shown in fig. 6 does not constitute a limitation of the electronic device, and the electronic device may include more or less components than shown, or may combine certain components, or may be arranged in different components, which are not described in detail herein.
The user input unit 607 is configured to receive a first operation for a target application, where the first operation is configured to trigger the electronic device to switch from the target application to a system desktop, and the first operation includes: an operation triggered by a navigation gesture or an operation triggered by a navigation key;
A processor 610 configured to obtain a first operation parameter of the first operation, where the first operation parameter includes a pressing duration; determining whether the pressing time length reaches a preset time length;
a display unit 606, configured to display a first area and a second area on the screen if the pressing duration reaches a preset duration;
A user input unit 607 for receiving a second operation for the screen area;
The processor 610 is further configured to obtain a second operation parameter of the second operation, where the second operation parameter includes: an operation area and an operation type; and determining whether the target application program is still running in the background after switching to the system desktop according to the second operation parameter.
In the embodiment of the application, when receiving the first operation for triggering the electronic equipment to switch from the target application program to the system desktop, the pressing duration of the first operation can be obtained, the pressing duration of the first operation is determined to reach the preset duration, and the first area and the second area are displayed on the screen; and then receiving a second operation aiming at the screen area, acquiring an operation area and an operation type of the second operation, and determining whether the target application program is still operated in the background after switching to the system desktop according to the operation area and the operation type of the second operation. Compared with the prior art, in the embodiment of the application, when the user exits the application program and switches to the system desktop, the user can select whether to keep the background operation of the application program or not by simply adjusting the pressing time of the exit operation and simply operating the area displayed on the screen, so that the operation is simple and quick.
Optionally, as an embodiment, the processor 610 is further configured to determine to close the target application after switching to the system desktop when the second operation is an operation of sliding to the first area; and when the second operation is the operation of sliding to the second area, determining to run the target application program in the background after switching to the system desktop.
Optionally, as an embodiment, the processor 610 is further configured to determine to close the target application after switching to the system desktop if the pressing duration is less than a preset duration.
Optionally, as an embodiment, the first area is a left half area of the screen, and the second area is a right half area of the screen; or alternatively
The first area is the upper half area of the screen, and the second area is the lower half area of the screen.
Optionally, as an embodiment, a prompt is displayed on the first area and the second area, where the prompt is used to indicate a correspondence between a user operation and an operation mode of the target application after switching to a system desktop.
It should be appreciated that in embodiments of the present application, the input unit 604 may include a graphics processor (Graphics Processing Unit, GPU) 6041 and a microphone 6042, with the graphics processor 6041 processing image data of still pictures or video obtained by an image capturing apparatus (e.g., a camera) in a video capturing mode or an image capturing mode. The display unit 606 may include a display panel 6061, and the display panel 6061 may be configured in the form of a liquid crystal display, an organic light emitting diode, or the like. The user input unit 607 includes a touch panel 6071 and other input devices 6072. The touch panel 6071 is also called a touch screen. The touch panel 6071 may include two parts of a touch detection device and a touch controller. Other input devices 6072 may include, but are not limited to, a physical keyboard, function keys (e.g., volume control keys, switch keys, etc.), a trackball, a mouse, a joystick, and so forth, which are not described in detail herein. The memory 609 may be used to store software programs as well as various data including, but not limited to, application programs and an operating system. The processor 610 may integrate an application processor that primarily handles operating systems, user interfaces, applications, etc., with a modem processor that primarily handles wireless communications. It will be appreciated that the modem processor described above may not be integrated into the processor 610.
The embodiment of the application also provides a readable storage medium, wherein the readable storage medium stores a program or an instruction, and the program or the instruction realizes each process of the operation control method embodiment of the application program when being executed by a processor, and can achieve the same technical effect, so that repetition is avoided and redundant description is omitted.
Wherein the processor is a processor in the electronic device described in the above embodiment. The readable storage medium includes a computer readable storage medium such as a Read-Only Memory (ROM), a random access Memory (RandomAccess Memory, RAM), a magnetic disk or an optical disk, and the like.
The embodiment of the application further provides a chip, the chip comprises a processor and a communication interface, the communication interface is coupled with the processor, the processor is used for running programs or instructions, the processes of the running control method embodiment of the application program can be realized, the same technical effects can be achieved, and the repetition is avoided, and the description is omitted here.
It should be understood that the chips referred to in the embodiments of the present application may also be referred to as system-on-chip chips, chip systems, or system-on-chip chips, etc.
It should be noted that, in this document, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or apparatus. Without further limitation, an element defined by the phrase "comprising one … …" does not exclude the presence of other like elements in a process, method, article, or apparatus that comprises the element. Furthermore, it should be noted that the scope of the methods and apparatus in the embodiments of the present application is not limited to performing the functions in the order shown or discussed, but may also include performing the functions in a substantially simultaneous manner or in an opposite order depending on the functions involved, e.g., the described methods may be performed in an order different from that described, and various steps may be added, omitted, or combined. Additionally, features described with reference to certain examples may be combined in other examples.
From the above description of the embodiments, it will be clear to those skilled in the art that the above-described embodiment method may be implemented by means of software plus a necessary general hardware platform, but of course may also be implemented by means of hardware, but in many cases the former is a preferred embodiment. Based on such understanding, the technical solution of the present application may be embodied essentially or in a part contributing to the prior art in the form of a software product stored in a storage medium (e.g. ROM/RAM, magnetic disk, optical disk) comprising instructions for causing a terminal (which may be a mobile phone, a computer, a server, an air conditioner, or a network device, etc.) to perform the method according to the embodiments of the present application.
The embodiments of the present application have been described above with reference to the accompanying drawings, but the present application is not limited to the above-described embodiments, which are merely illustrative and not restrictive, and many forms may be made by those having ordinary skill in the art without departing from the spirit of the present application and the scope of the claims, which are to be protected by the present application.