CN109408271B - Response method and device for sliding cover operation and storage medium - Google Patents

Response method and device for sliding cover operation and storage medium Download PDF

Info

Publication number
CN109408271B
CN109408271B CN201811224062.5A CN201811224062A CN109408271B CN 109408271 B CN109408271 B CN 109408271B CN 201811224062 A CN201811224062 A CN 201811224062A CN 109408271 B CN109408271 B CN 109408271B
Authority
CN
China
Prior art keywords
attribute information
sliding cover
target
target application
terminal
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN201811224062.5A
Other languages
Chinese (zh)
Other versions
CN109408271A (en
Inventor
余丽芳
常群
高尚
肖春明
耿如月
龙海
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Beijing Xiaomi Mobile Software Co Ltd
Original Assignee
Beijing Xiaomi Mobile Software Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Beijing Xiaomi Mobile Software Co Ltd filed Critical Beijing Xiaomi Mobile Software Co Ltd
Priority to CN201811224062.5A priority Critical patent/CN109408271B/en
Publication of CN109408271A publication Critical patent/CN109408271A/en
Application granted granted Critical
Publication of CN109408271B publication Critical patent/CN109408271B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/07Responding to the occurrence of a fault, e.g. fault tolerance
    • G06F11/0703Error or fault processing not based on redundancy, i.e. by taking additional measures to deal with the error or fault not making use of redundancy in operation, in hardware, or in data representation
    • G06F11/0793Remedial or corrective actions
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F3/00Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
    • G06F3/01Input arrangements or combined input and output arrangements for interaction between user and computer
    • G06F3/048Interaction techniques based on graphical user interfaces [GUI]
    • G06F3/0487Interaction techniques based on graphical user interfaces [GUI] using specific features provided by the input device, e.g. functions controlled by the rotation of a mouse with dual sensing arrangements, or of the nature of the input device, e.g. tap gestures based on pressure sensed by a digitiser
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/60Software deployment
    • G06F8/65Updates

Landscapes

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

Abstract

The disclosure relates to a response method and device for sliding cover operation and a storage medium, and belongs to the technical field of terminals. The method comprises the following steps: when the sliding cover operation is detected, determining a target application currently running in a foreground; if the response of the target application to the sliding cover operation fails, acquiring current attribute information of a virtual key matched with the target application, wherein the target application is a third-party application with updated version, the virtual key is used for starting a target function in the target application, and the current attribute information is matched with the updated version of the target application; if the current attribute information is inconsistent with the historical attribute information of the virtual key, replacing the current historical attribute information adapted to the sliding cover operation with the current attribute information; and when the sliding cover operation is detected again, the target function is started in response to the sliding cover operation. The method replaces the updated attribute information of the third-party application in time, realizes quick adaptation after the third-party application is updated, and ensures the continuity of the terminal response sliding cover operation.

Description

Response method and device for sliding cover operation and storage medium
Technical Field
The present disclosure relates to the field of terminal technologies, and in particular, to a method and an apparatus for responding to a slider operation, and a storage medium.
Background
With the development of terminal technology and the transformation of aesthetic standards of users, it has become a popular trend to design a display screen of a terminal as a full screen. For example, to achieve a 100% full screen, the terminal may be designed as a slider type, i.e., the terminal is composed of two parts supporting opening and closing, which are named as an example in a first configuration and a second configuration, the first configuration being capable of push-pull movement on the second configuration. The time-lapse sliding cover terminal supports a user to simulate manual virtual key clicking operation through sliding cover operation, and performs relevant response to improve user experience. For example, the slider terminal can complete operations such as opening a camera, answering a call, and the like after detecting a slider operation. Wherein the slide cover is operated to change the first structure and the second structure from the closed state to the open state based on the push-pull operation.
The manner in which the slider terminal responds to the slider operation in the related art is as follows: when the sliding closure terminal detects sliding closure operation triggered by a user, determining the current third-party application in foreground operation, and automatically starting a preset function in the third-party application to respond to the sliding closure operation. However, the update period of the third-party application is short compared to the update period of the operating system, so that the version of the third-party application is frequently updated, and with the update of the third-party application, the attribute information of the virtual key of the third-party application, such as the layout or name, may be changed. The virtual key is used for starting the preset function. At this time, the operation of the sliding cover still adapts to the attribute information before updating because the operation system is not up to the updating time, and for the situation, the sliding cover operation cannot simulate the operation of manually clicking the virtual key any more during the period from the update of the third-party application to the update of the operation system, that is, even if the user triggers the sliding cover operation during the period, the sliding cover terminal cannot respond. Therefore, in the case of update of the third-party application, how to ensure that the slider terminal continuously responds to the slider operation becomes a focus of attention of those skilled in the art.
Disclosure of Invention
The disclosure provides a response method and device for sliding closure operation and a storage medium.
According to a first aspect of the embodiments of the present disclosure, there is provided a method for responding to a slider operation, the method including:
when the sliding cover operation is detected, determining a target application currently running in a foreground;
if the response of the target application to the sliding cover operation fails, acquiring current attribute information of a virtual key matched with the target application, wherein the target application is a third-party application with version update, the virtual key is used for starting a target function in the target application, and the current attribute information is matched with the update version of the target application;
if the current attribute information is inconsistent with the historical attribute information of the virtual key, replacing the historical attribute information which is adapted to the sliding closure operation currently with the current attribute information;
and when the sliding cover operation is detected again, responding to the sliding cover operation and starting the target function.
In a possible implementation manner, when a call request page of the target application is displayed on a terminal screen, and when a slider operation is detected again, starting the target function in response to the slider operation includes:
and when the first structure of the terminal is detected to move along the target direction on the second structure again, responding to the sliding cover operation, answering the call and displaying a call answering page.
In a possible implementation manner, when a call request page or a viewfinder page of the target application is not displayed on a terminal screen, when a sliding cover operation is detected again, starting the target function in response to the sliding cover operation includes:
and when the first structure of the terminal is detected to move along the target direction on the second structure again, responding to the sliding cover operation, and starting the shooting function of the target application.
In a possible implementation manner, when a viewfinder frame page is displayed on a terminal screen, and when a sliding cover operation is detected again, the target function is started in response to the sliding cover operation, including:
and when the first structure of the terminal is detected to move along the target direction on the second structure again, responding to the sliding cover operation, and switching the shooting direction.
In one possible implementation manner, the starting the target function in response to the sliding cover operation when the sliding cover operation is detected again includes:
and when the first structure of the terminal is detected to move along the target direction on the second structure again, responding to the sliding cover operation, and sending an execution notice to the target application so as to enable the target application to start the target function.
In one possible implementation, the method further includes:
and calling a target sensor built in the terminal based on the sensor management interface to detect the sliding closure operation.
According to a second aspect of embodiments of the present disclosure, there is provided a response device of a slide operation, the device including:
the device comprises a determining module, a judging module and a display module, wherein the determining module is configured to determine a target application currently running in a foreground when a sliding cover operation is detected;
the acquisition module is configured to acquire current attribute information of a virtual key matched with the target application if the target application fails to respond to the sliding closure operation, wherein the target application is a third party application with a version update, the virtual key is used for starting a target function in the target application, and the current attribute information is matched with an updated version of the target application;
the replacing module is configured to replace the current attribute information with the historical attribute information which is adapted to the sliding cover operation if the current attribute information is inconsistent with the historical attribute information of the virtual key;
and the response module is configured to respond to the sliding cover operation and start the target function when the sliding cover operation is detected again.
In a possible implementation manner, the response module is further configured to respond to the operation of the sliding cover when detecting that the first structure of the terminal moves in the target direction on the second structure again when the call request page of the target application is displayed on the screen of the terminal, and answer the call and display the call answer page.
In a possible implementation manner, the response module is further configured to, when the call request page or the viewfinder page of the target application is not displayed on the terminal screen, respond to the sliding cover operation and start the shooting function of the target application when the first structure of the terminal is detected to move in the target direction on the second structure again.
In a possible implementation manner, the response module is further configured to switch the shooting direction in response to the sliding cover operation when the first structure of the terminal is detected to move in the target direction on the second structure again when the viewfinder frame page is displayed on the terminal screen.
In a possible implementation manner, the response module is further configured to send an execution notification to the target application in response to the sliding cover operation when the first structure of the terminal is detected to move in the target direction on the second structure again, so that the target application starts the target function.
In one possible implementation, the apparatus further includes:
and the detection module is configured to call a target sensor built in the terminal to detect the sliding closure operation based on the sensor management interface.
According to a third aspect of the disclosed embodiments, there is provided a response device for a slide operation, the device comprising:
a processor;
a memory for storing processor-executable instructions;
wherein the processor is configured to: when the sliding cover operation is detected, determining a target application currently running in a foreground; if the response of the target application to the sliding cover operation fails, acquiring current attribute information of a virtual key matched with the target application, wherein the target application is a third-party application with version update, the virtual key is used for starting a target function in the target application, and the current attribute information is matched with the update version of the target application; if the current attribute information is inconsistent with the historical attribute information of the virtual key, replacing the historical attribute information which is adapted to the sliding closure operation currently with the current attribute information; and when the sliding cover operation is detected again, responding to the sliding cover operation and starting the target function.
According to a fourth aspect of embodiments of the present disclosure, there is provided a computer-readable storage medium having stored thereon computer program instructions, which when executed by a processor, implement the response method of the slide cover operation of the first aspect described above.
The method provided by the embodiment of the disclosure is directed to the situation that the attribute information of a virtual key matched with the application is changed due to version update of a third-party application, and the response of a terminal to the sliding cover operation of the application fails because the attribute information of the application is not updated by an operating system, the terminal can immediately acquire the latest attribute information of the application after detecting the response failure event of the sliding cover operation and replace the historical attribute information matched with the sliding cover operation by the latest attribute information, so that the operating system timely completes the update of the attribute information of the application, when the terminal detects the sliding cover event of the application again, the terminal can successfully respond to the sliding cover operation based on the latest attribute information to start the corresponding function in the application, and the time from the update of the third-party application to the update of the operating system is realized, the sliding cover operation can continue to simulate the operation of manually clicking the virtual key by the user, namely the sliding cover operation triggered by the user in the period of time, and the terminal can also successfully respond. Namely, the embodiment of the disclosure realizes rapid adaptation after the third-party application is updated, and ensures the continuity of the terminal responding to the sliding closure operation.
It is to be understood that both the foregoing general description and the following detailed description are exemplary and explanatory only and are not restrictive of the disclosure.
Drawings
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 disclosure.
Fig. 1 is a schematic diagram illustrating a structure of a terminal according to an exemplary embodiment.
Fig. 2 is a schematic diagram illustrating a structure of a terminal according to an exemplary embodiment.
Fig. 3 is a flow chart illustrating a response method of a slider operation according to an exemplary embodiment.
Fig. 4 is a flow chart illustrating a response method of a slider operation according to an exemplary embodiment.
FIG. 5 is a block diagram illustrating a response device for operation of a slider, according to an exemplary embodiment.
FIG. 6 is a block diagram illustrating a response device for operation of a slider, according to an exemplary embodiment.
FIG. 7 is a block diagram illustrating a response device for operation of a slider, according to an exemplary embodiment.
Detailed Description
Reference will now be made in detail to the exemplary embodiments, examples of which are illustrated in the accompanying drawings. When the following description refers to the accompanying drawings, like numbers in different drawings represent the same or similar elements unless otherwise indicated. The implementations described in the exemplary embodiments below are not intended to represent all implementations consistent with the present disclosure. Rather, they are merely examples of apparatus and methods consistent with certain aspects of the present disclosure, as detailed in the appended claims.
Before explaining the embodiments of the present disclosure in detail, some terms related to the embodiments of the present disclosure will be briefly described.
A third party application: in the embodiment of the present disclosure, the third-party application generally refers to an application installed in the terminal other than the application carried by the operating system of the terminal. For example, the third-party application may be an instant messaging application or a camera application downloaded from a third-party application download platform, which is not specifically limited in this disclosure.
The following describes an implementation environment related to a response method for a slider operation provided in an embodiment of the present disclosure. Fig. 1 and 2 are schematic structural views illustrating a terminal of a push-pull mobile type, which is also referred to as a slider terminal in the embodiment of the present disclosure, according to an exemplary embodiment. Fig. 1 is a side view of the slide terminal in a closed state, and fig. 2 is a side view of the slide terminal in a separated state. As shown in fig. 1 and 2, the terminal includes: the device comprises a first structure and a second structure, wherein the first structure covers the second structure, and the first structure can be pushed and pulled to move on the second structure. The first structure is responsible for displaying, 100% of full-screen can be achieved, the second structure comprises other components forming the terminal, and the second structure is generally provided with a front camera, namely for the sliding cover terminal, the front camera is generally arranged on the second structure in order to achieve 100% of full-screen.
Based on the above structure of the slide terminal, in the embodiment of the present disclosure, the slide operation refers to: the first structure is moved in a push-pull manner over the second structure. For example, when the first structure of the terminal is moved from the position shown in fig. 1 to the position shown in fig. 2 by pushing and pulling on the second structure, it means that the user performs a sliding operation.
In the embodiment of the disclosure, the terminal can simulate the operation of manually clicking the virtual key by the user through the sliding cover operation, respond and open the specific function in the third-party application. For example, after the terminal detects the operation of the sliding cover, if it is determined that the third-party application currently running in the foreground is the camera application, the shooting function of the camera application can be automatically started.
In addition, as described above, the update period of the third-party application is short compared to the update period of the operating system, the version of the third-party application may be updated frequently, and with the update of the third-party application, the attribute information of the virtual key, such as the third-party application, may be changed, such as the layout or the name is changed. At this time, the operating system does not reach the update time, so the new attribute information operating system does not know in time, and for the situation, the sliding cover operation cannot simulate the operation of manually clicking the virtual key any more during the period from the update of the third-party application to the update of the operating system, namely, the sliding cover terminal cannot respond even if the user triggers the sliding cover operation during the period. In order to solve the problem of failure of simulated click caused by version update of third-party application, the embodiments of the present disclosure provide a response method for a slider operation, and refer to the following embodiments specifically.
Fig. 3 is a flowchart illustrating a response method of a slide operation according to an exemplary embodiment, where an execution subject of the method is a terminal, and the method may be executed by an operating system of the terminal. As shown in fig. 3, the method comprises the following steps:
in step 301, when a slider operation is detected, a target application currently running in the foreground is determined.
In step 302, if the response of the target application to the slider operation fails, current attribute information of a virtual key matched with the target application is obtained, the target application is a third party application with a version update, the virtual key is used for starting a target function in the target application, and the current attribute information is matched with an updated version of the target application.
In step 303, if the current attribute information is not consistent with the historical attribute information of the virtual key, the current attribute information is used to replace the historical attribute information currently adapted to the sliding cover operation.
In step 304, when the slider operation is detected again, the target function is started in response to the slider operation.
The method provided by the embodiment of the disclosure is directed to the situation that the attribute information of a virtual key matched with the application is changed due to version update of a third-party application, and the sliding closure operation response of the terminal to the application fails because the attribute information of the application is not updated by the operating system, the terminal can immediately acquire the latest attribute information of the application after detecting the response failure event of the sliding closure operation and replace the historical attribute information with the latest attribute information, so that the operating system timely completes the update of the attribute information of the application, when the terminal detects the sliding closure event of the application again, the sliding closure operation can be successfully responded based on the latest attribute information to start the corresponding function in the application, the time from the update of the third-party application to the update of the operating system is realized, and the sliding closure operation can continue to simulate the manual virtual key operation of a user, namely, the sliding closure operation triggered by the user in the period of time, the terminal can also successfully respond.
In one possible implementation manner, when a call request page of a target application is displayed on a terminal screen, when a sliding cover operation is detected again, a target function is started in response to the sliding cover operation, including:
and when the first structure of the terminal is detected to move along the target direction on the second structure again, responding to the operation of the sliding cover, answering the call and displaying a call answering page.
In one possible implementation manner, when a call request page or a viewfinder page of a target application is not displayed on a terminal screen, when a sliding cover operation is detected again, a target function is started in response to the sliding cover operation, including:
and when the first structure of the terminal is detected to move along the target direction on the second structure again, responding to the sliding cover operation and starting the shooting function of the target application.
In one possible implementation manner, when a viewfinder frame page is displayed on a terminal screen, when a sliding cover operation is detected again, a target function is started in response to the sliding cover operation, and the target function includes:
and when the first structure of the terminal is detected to move along the target direction on the second structure again, responding to the sliding cover operation and switching the shooting direction.
In one possible implementation, when the sliding cover operation is detected again, the target function is started in response to the sliding cover operation, and the method includes:
and when the first structure of the terminal is detected to move along the target direction on the second structure again, responding to the sliding cover operation, and sending an execution notice to the target application so as to enable the target application to start the target function.
In one possible implementation, the method further comprises:
and calling a target sensor built in the terminal to detect the sliding closure operation based on the sensor management interface.
All the above optional technical solutions may be combined arbitrarily to form the optional embodiments of the present disclosure, and are not described herein again.
FIG. 4 is a flowchart illustrating a response method of a slide operation according to an exemplary embodiment, where an execution subject of the method is a terminal, as shown in FIG. 4, including the following steps
In step 401, when the slider operation is detected, the terminal determines a target application currently running in the foreground.
Wherein the target application refers to a third party application currently running in the foreground in the embodiments of the present disclosure. Because the types of the third-party applications installed on the terminal are many, and the sliding operation may be matched with a plurality of third-party applications, that is, the terminal may default settings or a user sets a specific function for starting the plurality of third-party applications by the sliding operation, so that in order to avoid an error when responding to the sliding operation, the terminal needs to determine which specific function of the third-party applications should be started by itself to respond when detecting the sliding operation. In the embodiment of the present disclosure, the terminal may determine the target application according to whether the application is in a foreground running state. The foreground running state refers to that an interface which can be used for human-computer interaction and is provided with third-party application is displayed on a display screen of the terminal.
In the embodiment of the disclosure, the user can set the application adaptive to the sliding cover operation by himself. For example, the user may preset the sliding operation to be adapted to the instant messaging application, or preset the sliding operation to be adapted to the camera application. In addition, the embodiment of the present disclosure also supports an application that is adapted to the operation of the sliding cover by default setting of the terminal, and the embodiment of the present disclosure is not specifically limited to this. It should be noted that, because the applications have rich functions, the embodiment of the present disclosure further supports the function of adapting to the operation of the sliding cover in one application set by the user or set by default in the terminal.
In addition, since the sliding operation is used to simulate the manual clicking operation, the terminal also needs to determine the attribute information of a virtual key corresponding to the function adapted to the sliding operation in an application, that is, the terminal also needs to update the attribute information adapted to the sliding operation in time, so as to maintain the effectiveness of the manual clicking operation of the simulated user.
The embodiment of the present disclosure does not specifically limit the manner in which the terminal detects the sliding cover operation, and for example, the terminal may invoke a target sensor built in the terminal to detect the sliding cover operation based on the sensor management interface. The target sensor refers to a sensor capable of detecting the operation of the sliding cover, the sensor management interface may be a SensorManager API, and the sensor management interface may call the target sensor to detect the operation of the sliding cover. That is, in the embodiment of the present disclosure, for the closing or opening action of the slider terminal, the SensorManager API monitors the closing or opening action of the slider terminal through the SensorManager API by triggering detection and identification of hardware.
In step 402, if the response of the target application to the slider operation fails, the terminal obtains the current attribute information of the virtual key matched with the target application.
The virtual key is used for starting a target function in a target application, wherein the target function can be a call answering function or a shooting function. Taking a target application as an instant messaging application as an example, the virtual key can be a virtual key for starting a shooting function, and after the key is clicked, the terminal calls a front camera or a rear camera to shoot; or, the virtual key can also be a virtual key with a function of answering the call, and after the key is clicked, the terminal answers the call.
In the embodiment of the present disclosure, the failure of the target application to respond to the sliding cover operation refers to that the sliding cover operation cannot start the target function in the target application, that is, the sliding cover operation simulates a manual click operation to fail. In this case, the version update of the target application is usually caused by the occurrence of the version update of the target application, and the attribute information of the virtual key is changed due to the version update of the target application. That is, when the terminal detects a slider operation and determines that the target application currently running in the foreground is operated, an operation of manually clicking a virtual key matched with the target application is simulated, and since the version of the target application is updated and the attribute information is changed, a situation that the simulation cannot be continued and the target function in the target application cannot be started occurs, that is, the target application fails to respond to the slider operation.
The attribute information includes, but is not limited to, layout information and name information of the virtual key. The layout information refers to the position of a virtual key corresponding to a target function on a display screen when the target application runs in the foreground, and the name information refers to code logic corresponding to the virtual key.
In addition, after determining that the response of the target application to the sliding cover operation fails, the terminal acquires the current attribute information of the virtual key matched with the target application. The current attribute information refers to the attribute information included in the latest version information after the version update occurs, that is, the latest attribute information is acquired by the terminal.
In addition, if the version of the target application is not updated or the attribute information is not changed after the version is updated, the terminal will respond to the sliding cover operation and automatically start the target function in the target application. For example, when the target application is an instant messaging application and the application receives a voice call request, a call request page is displayed on a display screen of the terminal to remind a user. At this time, even if the communication application is in the foreground running state, the terminal can automatically start the call answering function in the instant communication application after detecting the operation of the sliding cover.
In step 403, if the current attribute information is not consistent with the historical attribute information of the virtual key, the terminal replaces the historical attribute information currently adapted to the sliding cover operation with the current attribute information.
In the embodiment of the disclosure, when the terminal detects the sliding cover operation, in order to simulate manually clicking the virtual key, the historical attribute information currently adapted to the sliding cover operation is obtained to start the target function in the target application, but when the target application has undergone version update and the version update causes a change in the corresponding attribute information, the historical attribute information is no longer applicable to the sliding cover operation.
Taking the layout information as an example, after the layout information changes, if the terminal does not update the layout information, the terminal may also simulate the user to manually click the virtual key at the original position, and the display position of the actual virtual key is different on the display interface, which may cause the situation that the sliding cover operation simulates the manual click failure and the target application fails to respond to the sliding cover operation. Therefore, when the version of the target application is updated and the attribute information changes due to the version update, the attribute information adapted to the sliding cover operation needs to be updated in time, that is, the terminal replaces the current historical attribute information adapted to the sliding cover operation with the attribute information of the latest version.
When judging whether to replace the attribute information, the latest attribute information can be compared with the historical attribute information, and if the latest attribute information is not consistent with the historical attribute information, the attribute information is replaced.
In step 404, when it is detected again that the first structure of the terminal moves in the target direction on the second structure, the terminal sends an execution notification to the target application in response to the slider operation, so that the target application starts the target function.
The aforementioned sliding cover operation refers to that the first structure of the terminal moves on the second structure along a target direction, where the target direction may be that the first structure slides from top to bottom, and may also be that the first structure slides from bottom to top, which is not specifically limited in the embodiments of the present disclosure. The sliding direction is related to the position of the front camera, the target direction is from top to bottom when the front camera is at the top of the second structure, and the target direction is from bottom to top when the front camera is at the bottom of the second structure.
In the embodiment of the present disclosure, when the terminal detects the sliding cover operation again, since the attribute information is updated, that is, the association relationship between the sliding cover operation and the attribute information is updated, the terminal may successfully respond to the sliding cover operation. Therefore, before the attribute information corresponding to the next target application is changed due to the version update of the target application, the user can simulate and play back the sliding cover operation by executing the sliding cover operation, and execute a corresponding response event.
It should be noted that, in the process of the target application responding to the operation of the sliding cover, the terminal mainly sends an execution notification to the target application, and when the target application receives the execution notification, the target application starts the target function according to the execution notification.
Illustratively, the response of the terminal to the operation of the slider includes, but is not limited to, the following three:
in one possible implementation manner, the terminal may complete answering the call when detecting the operation of the sliding cover.
When the call request page of the target application is displayed on the terminal screen, responding to the operation of the sliding cover when the first structure of the terminal is detected to move along the target direction on the second structure again, answering the call and displaying the call answering page.
A call request page of the target application is displayed on the terminal screen, the target application is indicated to be in a foreground running state, and the function of answering the call which needs to be started at present can be determined. The terminal acquires the current attribute information of the call answering key in the target application, sends an execution notice to the target application based on the attribute information, and after receiving the execution notice, the target application simulates the operation of manually clicking the call answering key to answer the call and displays a call answering page on a terminal screen.
In one possible implementation, the terminal may start the photographing function when detecting the sliding cover operation.
When the call request page or the view finder frame page of the target application is not displayed on the terminal screen, responding to the sliding cover operation and starting the shooting function when the first structure of the terminal is detected to move along the target direction on the second structure again.
The terminal screen does not display the call request of the target application or a view frame page, and the fact that the target application needs to start a shooting function at present can be determined. The terminal acquires the current attribute information of the shooting key in the target application, and sends an execution notice to the target application based on the attribute information, after the target application receives the execution notice, the target application simulates the operation of manually clicking the shooting key, then opens the camera, starts the shooting function, and namely displays a view-finding frame on the display screen of the terminal. When the terminal is provided with a plurality of cameras, when the sliding cover operation is detected, which camera is started can be set by the default of the terminal, or can be set in advance by a user according to needs.
In one possible implementation manner, the terminal may complete the function of switching the shooting direction when detecting the operation of the sliding cover.
When the viewfinder frame page is displayed on the terminal screen, when the first structure of the terminal is detected to move along the target direction on the second structure again, the shooting direction is switched in response to the sliding cover operation.
When a view frame page of the target application is displayed on the terminal screen, the target application is in a foreground running state, and the function of switching the shooting direction can be determined to be started currently. The terminal acquires current attribute information of a switching camera key in the target application, sends an execution notice to the target application based on the attribute information, and after the target application receives the execution notice, simulates the operation of manually clicking the switching camera key, further switches the shooting direction and displays the shooting direction on a display screen of the terminal.
The embodiment of the present disclosure does not specifically limit the type of the switching of the shooting direction, and for example, the terminal is provided with a front camera and a rear camera, and when a finder frame page displayed on a terminal screen corresponds to the rear camera and a sliding cover operation is detected, the terminal automatically switches the cameras so that the finder frame page corresponds to the front camera for shooting. Similarly, when the view frame page displayed on the terminal screen corresponds to the front camera and the sliding cover operation is detected, the terminal automatically switches the camera, so that the view frame page corresponds to the shooting of the rear camera.
For example, an execution main body of the response method for the sliding cover operation is an operating system of the terminal, and the operating system of the terminal sends an execution notification to a third-party application when detecting the sliding cover operation, so that the third party responds to the sliding cover operation and starts a preset function.
The method provided by the embodiment of the disclosure is directed to the situation that the attribute information of a virtual key matched with the application is changed due to version update of a third-party application, and the response of a terminal to the sliding cover operation of the application fails because the attribute information of the application is not updated by an operating system, the terminal can immediately acquire the latest attribute information of the application after detecting the response failure event of the sliding cover operation and replace the historical attribute information matched with the sliding cover operation by the latest attribute information, so that the operating system timely completes the update of the attribute information of the application, when the terminal detects the sliding cover event of the application again, the terminal can successfully respond to the sliding cover operation based on the latest attribute information to start the corresponding function in the application, and the time from the update of the third-party application to the update of the operating system is realized, the sliding cover operation can continue to simulate the operation of manually clicking the virtual key by the user, namely the sliding cover operation triggered by the user in the period of time, and the terminal can also successfully respond. Namely, the embodiment of the disclosure realizes rapid adaptation after the third-party application is updated, and ensures the continuity of the terminal responding to the sliding closure operation.
FIG. 5 is a block diagram illustrating a response device for operation of a slider, according to an exemplary embodiment. As shown in fig. 5, the apparatus includes a determination module 501, an acquisition module 502, a replacement module 503, and a response module 504.
A determining module 501, configured to determine, when a slider operation is detected, a target application currently running in a foreground;
an obtaining module 502, configured to obtain current attribute information of a virtual key matched with a target application if a response of the target application to a slider operation fails, where the target application is a third party application with a version update, the virtual key is used to start a target function in the target application, and the current attribute information is matched with an update version of the target application;
a replacing module 503 configured to replace the current historical attribute information adapted to the sliding cover operation with the current attribute information if the current attribute information is inconsistent with the historical attribute information of the virtual key;
a response module 504 configured to start the target function in response to the slider operation when the slider operation is detected again.
The device provided by the embodiment of the disclosure, aiming at the situation that the attribute information of the virtual key matched with the application is changed due to version update of the third-party application, and the sliding closure operation response failure of the terminal aiming at the application is caused by that the attribute information of the application is not updated by the operating system, the terminal can immediately acquire the latest attribute information of the application after detecting the response failure event of the sliding closure operation and replace the historical attribute information matched with the sliding closure operation by the latest attribute information, so that the operating system can timely finish the update of the attribute information of the application, when the terminal detects the sliding closure event aiming at the application again, the sliding closure operation can be successfully responded based on the latest attribute information, the corresponding function in the application is started, and the period from the update of the third-party application to the update of the operating system is realized, the sliding cover operation can continue to simulate the operation of manually clicking the virtual key by the user, namely the sliding cover operation triggered by the user in the period of time, and the terminal can also successfully respond. Namely, the embodiment of the disclosure realizes rapid adaptation after the third-party application is updated, and ensures the continuity of the terminal responding to the sliding closure operation.
In one possible implementation, the response module 504 is further configured to answer the call and display a call answer page in response to the operation of the slider when it is detected again that the first structure of the terminal moves in the target direction on the second structure when the call request page of the target application is displayed on the screen of the terminal.
In one possible implementation, the response module 504 is further configured to, when the call request page or the viewfinder page of the target application is not displayed on the terminal screen, respond to the slider operation to start the shooting function of the target application when it is detected again that the first structure of the terminal moves in the target direction on the second structure.
In one possible implementation, the response module 504 is further configured to switch the shooting direction in response to the slider operation when the movement of the first structure of the terminal in the target direction on the second structure is detected again when the viewfinder page is displayed on the terminal screen.
In one possible implementation, the response module 504 is further configured to send an execution notification to the target application in response to the slider operation to cause the target application to start the target function when the first structure of the terminal is detected to move in the target direction on the second structure again.
In one possible implementation, referring to fig. 6, the apparatus further includes a detection module 505 configured to invoke a target sensor built in the terminal to detect a slider operation based on the sensor management interface.
All the above optional technical solutions may be combined arbitrarily to form the optional embodiments of the present disclosure, and are not described herein again.
Fig. 7 is a block diagram illustrating a response device 700 for operation of a slider according to an exemplary embodiment. For example, the apparatus 700 may be a mobile phone, a computer, a digital broadcast terminal, a messaging device, a game console, a tablet device, a medical device, an exercise device, a personal digital assistant, and the like.
Referring to fig. 7, apparatus 700 may include one or more of the following components: processing component 702, memory 704, power component 706, multimedia component 708, audio component 710, interface to I/O (Input/Output) 712, sensor component 714, and communication component 716.
The processing component 702 generally controls overall operation of the device 700, such as operations associated with display, telephone calls, data communications, camera operations, and recording operations. The processing components 702 may include one or more processors 720 to execute instructions to perform all or a portion of the steps of the methods described above. Further, the processing component 702 may include one or more modules that facilitate interaction between the processing component 702 and other components. For example, the processing component 702 may include a multimedia module to facilitate interaction between the multimedia component 708 and the processing component 702.
The memory 704 is configured to store various types of data to support operations at the apparatus 700. Examples of such data include instructions for any application or method operating on device 700, contact data, phonebook data, messages, pictures, videos, and so forth. The Memory 704 may be implemented by any type of volatile or non-volatile Memory device or combination thereof, such as an SRAM (Static Random Access Memory), an EEPROM (Electrically-Erasable Programmable Read-Only Memory), an EPROM (Erasable Programmable Read-Only Memory), a PROM (Programmable Read-Only Memory), a ROM (Read-Only Memory), a magnetic Memory, a flash Memory, a magnetic disk, or an optical disk.
The power supply component 706 provides power to the various components of the device 700. The power components 706 may include a power management system, one or more power supplies, and other components associated with generating, managing, and distributing power for the apparatus 700.
The multimedia component 708 includes a screen that provides an output interface between the device 700 and the user. In some embodiments, the screen may include an LCD (Liquid Crystal Display) and a TP (Touch Panel). If the screen includes a touch panel, the screen may be implemented as a touch screen to receive an input signal from a user. The touch panel includes one or more touch sensors to sense touch, slide, and gestures on the touch panel. The touch sensor may not only sense the boundary of a touch or slide action, but also detect the duration and pressure associated with the touch or slide operation. In some embodiments, the multimedia component 708 includes a front facing camera and/or a rear facing camera. The front camera and/or the rear camera may receive external multimedia data when the device 700 is in an operation mode, such as a photographing mode or a video mode. Each front camera and rear camera may be a fixed optical lens system or have a focal length and optical zoom capability.
The audio component 710 is configured to output and/or input audio signals. For example, the audio component 710 includes a MIC (Microphone) configured to receive external audio signals when the device 700 is in an operational mode, such as a call mode, a recording mode, and a voice recognition mode. The received audio signal may further be stored in the memory 704 or transmitted via the communication component 716. In some embodiments, audio component 710 also includes a speaker for outputting audio signals.
The I/O interface 712 provides an interface between the processing component 702 and peripheral interface modules, which may be keyboards, click wheels, buttons, etc. These buttons may include, but are not limited to: a home button, a volume button, a start button, and a lock button.
The sensor assembly 714 includes one or more sensors for providing status assessment of various aspects of the apparatus 700. For example, sensor assembly 714 may detect an open/closed state of device 700, the relative positioning of components, such as a display and keypad of apparatus 700, the change in position of apparatus 700 or a component of apparatus 700, the presence or absence of user contact with apparatus 700, the orientation or acceleration/deceleration of apparatus 700, and the change in temperature of apparatus 700. The sensor assembly 714 may include a proximity sensor configured to detect the presence of a nearby object without any physical contact. The sensor assembly 714 may also include a photosensor, such as a CMOS (Complementary Metal Oxide Semiconductor) or CCD (Charge-coupled Device) image sensor, for use in imaging applications. In some embodiments, the sensor assembly 714 may also include an acceleration sensor, a gyroscope sensor, a magnetic sensor, a pressure sensor, or a temperature sensor.
The communication component 716 is configured to facilitate wired or wireless communication between the apparatus 700 and other devices. The apparatus 700 may 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 716 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 716 further includes a Near Field Communication (NFC) module to facilitate short-range communications. For example, the NFC module may be implemented based on an RFID (Radio Frequency Identification) technology, an IrDA (infrared-Data Association) technology, an UWB (Ultra Wideband) technology, a BT (Bluetooth) technology, and other technologies.
In an exemplary embodiment, the apparatus 700 may be implemented by one or more ASICs (Application Specific Integrated circuits), DSPs (Digital signal processors), DSPDs (Digital signal processing devices), PLDs (Programmable Logic devices), FPGAs (Field Programmable Gate arrays), controllers, microcontrollers, microprocessors or other electronic components for performing the above-described methods.
In an exemplary embodiment, a non-transitory computer readable storage medium comprising instructions, such as the memory 704 comprising instructions, executable by the processor 720 of the device 700 to perform the above-described method is also provided. For example, the non-transitory computer readable storage medium may be a ROM, a RAM (Random Access Memory), a CD-ROM (Compact Disc Read-Only Memory), a magnetic tape, a floppy disk, an optical data storage device, and the like.
A non-transitory computer readable storage medium, wherein instructions, when executed by a processor of device 700, enable device 700 to perform the above-described response method for slider operation.
Other embodiments of the disclosure will be apparent to those skilled in the art from consideration of the specification and practice of the disclosure disclosed herein. This application is intended to cover any variations, uses, or adaptations of the disclosure following, in general, the principles of the disclosure and including such departures from the present disclosure as come within known or customary practice within the art to which the disclosure pertains. It is intended that the specification and examples be considered as exemplary only, with a true scope and spirit of the disclosure being indicated by the following claims.
It will be understood that the present disclosure is not limited to the precise arrangements 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 appended claims.

Claims (14)

1. A method of responding to operation of a slider, the method comprising:
when the sliding cover operation is detected, determining a target application currently running in a foreground;
if the response of the target application to the sliding cover operation fails, acquiring current attribute information of a virtual key matched with the target application, wherein the target application is a third-party application with version update, the virtual key is used for starting a target function in the target application, and the current attribute information is matched with the update version of the target application;
if the current attribute information is inconsistent with the historical attribute information of the virtual key, replacing the historical attribute information which is adapted to the sliding closure operation with the current attribute information, wherein the current attribute information and the historical attribute information both comprise name information and layout information;
and when the sliding cover operation is detected again, responding to the sliding cover operation and starting the target function.
2. The method according to claim 1, wherein when a call request page of the target application is displayed on a terminal screen, and when a slider operation is detected again, starting the target function in response to the slider operation comprises:
and when the first structure of the terminal is detected to move along the target direction on the second structure again, responding to the sliding cover operation, answering the call and displaying a call answering page.
3. The method according to claim 1, wherein when the call request page or the viewfinder page of the target application is not displayed on the terminal screen, and when a sliding cover operation is detected again, the starting of the target function in response to the sliding cover operation comprises:
and when the first structure of the terminal is detected to move along the target direction on the second structure again, responding to the sliding cover operation, and starting the shooting function of the target application.
4. The method of claim 1, wherein when a viewfinder page is displayed on a terminal screen, and when a slider operation is detected again, starting the target function in response to the slider operation comprises:
and when the first structure of the terminal is detected to move along the target direction on the second structure again, responding to the sliding cover operation, and switching the shooting direction.
5. The method of claim 1, wherein initiating the target function in response to the slider operation when the slider operation is again detected comprises:
and when the first structure of the terminal is detected to move along the target direction on the second structure again, responding to the sliding cover operation, and sending an execution notice to the target application so as to enable the target application to start the target function.
6. The method of claim 1, further comprising:
and calling a target sensor built in the terminal based on the sensor management interface to detect the sliding closure operation.
7. A slider-operated response device, the device comprising:
the device comprises a determining module, a judging module and a display module, wherein the determining module is configured to determine a target application currently running in a foreground when a sliding cover operation is detected;
the acquisition module is configured to acquire current attribute information of a virtual key matched with the target application if the target application fails to respond to the sliding closure operation, wherein the target application is a third party application with a version update, the virtual key is used for starting a target function in the target application, and the current attribute information is matched with an updated version of the target application;
a replacing module configured to replace the current attribute information with the historical attribute information currently adapted to the sliding cover operation if the current attribute information is inconsistent with the historical attribute information of the virtual key, where the current attribute information and the historical attribute information both include name information and layout information;
and the response module is configured to respond to the sliding cover operation and start the target function when the sliding cover operation is detected again.
8. The apparatus of claim 7, wherein the response module is further configured to answer the call and display a call answer page in response to the operation of the slider when it is detected again that the first structure of the terminal is moved in the target direction on the second structure when the call request page of the target application is displayed on the screen of the terminal.
9. The device according to claim 7, wherein the response module is further configured to start a shooting function of the target application in response to the sliding cover operation when it is detected again that the first structure of the terminal moves in the target direction on the second structure when the call request page or the viewfinder page of the target application is not displayed on the terminal screen.
10. The apparatus of claim 7, wherein the response module is further configured to switch the photographing direction in response to the sliding cover operation when it is detected again that the first structure of the terminal is moved in the target direction on the second structure when the viewfinder page is displayed on the terminal screen.
11. The apparatus of claim 7, wherein the response module is further configured to send an execution notification to the target application to cause the target application to start the target function in response to the sliding cover operation when the first structure of the terminal is detected to move in the target direction on the second structure again.
12. The apparatus of claim 7, further comprising:
and the detection module is configured to call a target sensor built in the terminal to detect the sliding closure operation based on the sensor management interface.
13. A slider-operated response device, the device comprising:
a processor;
a memory for storing processor-executable instructions;
wherein the processor is configured to: when the sliding cover operation is detected, determining a target application currently running in a foreground; if the response of the target application to the sliding cover operation fails, acquiring current attribute information of a virtual key matched with the target application, wherein the target application is a third-party application with version update, the virtual key is used for starting a target function in the target application, and the current attribute information is matched with the update version of the target application; if the current attribute information is inconsistent with the historical attribute information of the virtual key, replacing the historical attribute information which is adapted to the sliding closure operation with the current attribute information, wherein the current attribute information and the historical attribute information both comprise name information and layout information; and when the sliding cover operation is detected again, responding to the sliding cover operation and starting the target function.
14. A computer readable storage medium having computer program instructions stored thereon, wherein the computer program instructions, when executed by a processor, implement a method of responding to a slide operation according to any of the preceding claims 1 to 6.
CN201811224062.5A 2018-10-19 2018-10-19 Response method and device for sliding cover operation and storage medium Active CN109408271B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201811224062.5A CN109408271B (en) 2018-10-19 2018-10-19 Response method and device for sliding cover operation and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201811224062.5A CN109408271B (en) 2018-10-19 2018-10-19 Response method and device for sliding cover operation and storage medium

Publications (2)

Publication Number Publication Date
CN109408271A CN109408271A (en) 2019-03-01
CN109408271B true CN109408271B (en) 2022-04-15

Family

ID=65468666

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201811224062.5A Active CN109408271B (en) 2018-10-19 2018-10-19 Response method and device for sliding cover operation and storage medium

Country Status (1)

Country Link
CN (1) CN109408271B (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110888812B (en) * 2019-11-26 2023-11-07 国核自仪系统工程有限公司 Test system and test method for response time of terminal page

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101997945A (en) * 2009-08-25 2011-03-30 Lg电子株式会社 Display device in mobile terminal and method for controlling the same
CN106528252A (en) * 2016-12-09 2017-03-22 北京小米移动软件有限公司 Object launching method and apparatus
CN107295127A (en) * 2017-06-30 2017-10-24 联想(北京)有限公司 Handheld device and its application method
CN107308644A (en) * 2017-07-12 2017-11-03 腾讯科技(深圳)有限公司 The acquisition methods and device of configuration information
CN107436748A (en) * 2017-07-13 2017-12-05 普联技术有限公司 Handle method, apparatus, terminal device and the computer-readable recording medium of third-party application message

Family Cites Families (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US8948826B2 (en) * 2007-08-29 2015-02-03 Kyocera Corporation Electronic device and input interface switching method
JP4364273B2 (en) * 2007-12-28 2009-11-11 パナソニック株式会社 Portable terminal device, display control method, and display control program

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101997945A (en) * 2009-08-25 2011-03-30 Lg电子株式会社 Display device in mobile terminal and method for controlling the same
CN106528252A (en) * 2016-12-09 2017-03-22 北京小米移动软件有限公司 Object launching method and apparatus
CN107295127A (en) * 2017-06-30 2017-10-24 联想(北京)有限公司 Handheld device and its application method
CN107308644A (en) * 2017-07-12 2017-11-03 腾讯科技(深圳)有限公司 The acquisition methods and device of configuration information
CN107436748A (en) * 2017-07-13 2017-12-05 普联技术有限公司 Handle method, apparatus, terminal device and the computer-readable recording medium of third-party application message

Also Published As

Publication number Publication date
CN109408271A (en) 2019-03-01

Similar Documents

Publication Publication Date Title
CN106797416B (en) Screen control method and device
CN105159640B (en) Display interface rotating method and device and mobile terminal
EP3182716A1 (en) Method and device for video display
US20170344192A1 (en) Method and device for playing live videos
EP3113466A1 (en) Method and device for warning
CN111314768A (en) Screen projection method, screen projection device, electronic equipment and computer readable storage medium
CN107102772B (en) Touch control method and device
EP3136699A1 (en) Method and device for connecting external equipment
US11366569B2 (en) Interactive interface display method, apparatus and storage medium
CN107562349B (en) Method and device for executing processing
CN107132983B (en) Split-screen window operation method and device
CN106775210B (en) Wallpaper changing method and device
CN106465160B (en) Network function switching method and device
CN105227426B (en) Application interface switching method and device and terminal equipment
CN106919302B (en) Operation control method and device of mobile terminal
CN109408271B (en) Response method and device for sliding cover operation and storage medium
CN105786561B (en) Method and device for calling process
CN110597443B (en) Calendar display method, device and medium
CN108650412B (en) Display method, display device and computer readable storage medium
CN109922203B (en) Terminal, screen off method and device
CN106775246B (en) Screen brightness adjusting method and device
CN112905027A (en) Timing method and device, mobile terminal and storage medium
CN108037875B (en) Method, device and storage medium for switching input modes
CN106773753B (en) Equipment control method and device
CN106547444B (en) Method and device for realizing screen capture and mobile terminal

Legal Events

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