CN109445672B - Sliding cover event response method and device and storage medium - Google Patents

Sliding cover event response method and device and storage medium Download PDF

Info

Publication number
CN109445672B
CN109445672B CN201811223856.XA CN201811223856A CN109445672B CN 109445672 B CN109445672 B CN 109445672B CN 201811223856 A CN201811223856 A CN 201811223856A CN 109445672 B CN109445672 B CN 109445672B
Authority
CN
China
Prior art keywords
application program
event
detection result
sliding cover
type
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
CN201811223856.XA
Other languages
Chinese (zh)
Other versions
CN109445672A (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 CN201811223856.XA priority Critical patent/CN109445672B/en
Publication of CN109445672A publication Critical patent/CN109445672A/en
Application granted granted Critical
Publication of CN109445672B publication Critical patent/CN109445672B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • 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/0484Interaction techniques based on graphical user interfaces [GUI] for the control of specific functions or operations, e.g. selecting or manipulating an object, an image or a displayed text element, setting a parameter value or selecting a range
    • G06F3/0485Scrolling or panning

Landscapes

  • Engineering & Computer Science (AREA)
  • General Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Human Computer Interaction (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Telephone Function (AREA)
  • User Interface Of Digital Computer (AREA)
  • Telephonic Communication Services (AREA)

Abstract

The disclosure relates to a method and a device for responding to a sliding cover event and a storage medium, and belongs to the technical field of electronics. The method is applied to the terminal and comprises the following steps: when a sliding cover event is detected, detecting whether an application program in a foreground running state exists at present to obtain a detection result; and issuing the sliding cover event to a target application program according to the detection result, and responding to the sliding cover event through the target application program. The user only needs to execute the sliding event, the sliding event can be issued to the target application program according to whether the application program operated by the foreground exists or not, and the target application program responds, so that the operation steps are simplified, and the operation efficiency is improved. And whether the application program running in the foreground exists or not can be detected to determine the intention of the user to execute the sliding cover event, so that the response mode of the terminal can meet the operation requirement of the user.

Description

Sliding cover event response method and device and storage medium
Technical Field
The present disclosure relates to the field of electronic technologies, and in particular, to a method and an apparatus for responding to a slide event, and a storage medium.
Background
With the rapid development of electronic technology and the gradual increase of the display effect demand of users, a full-screen terminal has become a development trend. However, in most full-screen terminals, the front camera is disposed above the display screen, which reduces the screen occupation ratio of the terminal and affects the display effect.
In order to improve the screen occupation ratio, a sliding-cover terminal is proposed at present, and the terminal comprises a display screen and a host computer positioned below the display screen, wherein a front camera is arranged on the surface of the host computer opposite to the display screen. The front camera can be hidden when the display screen and the host are completely overlapped.
When a user needs to use the front camera, the sliding operation is triggered to expose the front camera, and shooting is carried out through the front camera. When the user does not need to use the front camera, the sliding switch is triggered to operate, and the front camera is shielded. Both the slide-on operation and the slide-off operation may be referred to as a slide event.
Disclosure of Invention
The disclosure provides a method, a device and a storage medium for responding to a sliding cover event, which can solve the problems of the related art. The technical scheme is as follows:
according to a first aspect of the embodiments of the present disclosure, there is provided a method for responding to a slide event, where the method is applied in a terminal and includes:
when a sliding cover event is detected, detecting whether an application program in a foreground running state exists at present to obtain a detection result;
and issuing the sliding cover event to a target application program according to the detection result, and responding to the sliding cover event through the target application program.
In a possible implementation manner, the detection result includes a first detection result and a second detection result, the first detection result includes an application identifier of an application currently in a foreground running state, and the second detection result is used to indicate that there is no application currently in the foreground running state.
In another possible implementation manner, the issuing the slide event to a target application according to the detection result, and responding to the slide event by the target application includes:
if the detection result is the first detection result, the sliding cover event is issued to the application program in the foreground running state according to the application identification, and the sliding cover event is responded through the application program in the foreground running state;
and if the detection result is the second detection result, issuing the sliding cover event to a preset application program, and responding to the sliding cover event through the preset application program.
In another possible implementation manner, the issuing the slide event to the application program in the foreground running state according to the application identifier includes:
and if the application program in the foreground running state is a third-party application program installed in the terminal, packaging the sliding cover event in a preset mode, so that the third-party application program calls a preset interface to respond to the sliding cover event.
In another possible implementation manner, the method further includes:
determining the type of the sliding cover event, wherein the type comprises a first type and a second type, the first type represents a sliding-open event, and the second type represents a sliding-close event.
In another possible implementation manner, the issuing the slide event to the target application according to the detection result, and responding to the slide event by the target application includes:
if the detection result is the first detection result and the type of the sliding cover event is the first type, issuing the sliding cover event to an application program in a foreground running state according to the application identifier, starting the front camera through the application program in the foreground running state, and displaying a shooting interface shot based on the front camera;
if the detection result is the first detection result and the type of the sliding cover event is the second type, the sliding cover event is issued to the application program in the foreground running state according to the application identifier, the front camera is closed through the application program in the foreground running state, and a shooting interface for shooting based on the front camera is closed.
In another possible implementation manner, the issuing the slide event to the target application according to the detection result, and responding to the slide event by the target application includes:
if the detection result is the second detection result and the type of the sliding cover event is the first type, issuing the sliding cover event to a preset application program, starting the front camera through the preset application program, and displaying a shooting interface shot based on the front camera;
and if the detection result is the second detection result and the type of the sliding cover event is the second type, responding to the sliding cover event comprises ignoring the sliding cover event.
According to a second aspect of the embodiments of the present disclosure, there is provided a slide event response device, which is applied in a terminal, including:
the detection module is used for detecting whether the application program in the foreground running state exists at present or not when the sliding cover event is detected, and obtaining a detection result;
and the processing module is used for issuing the sliding cover event to a target application program according to the detection result and responding the sliding cover event through the target application program.
In a possible implementation manner, the detection result includes a first detection result and a second detection result, the first detection result includes an application identifier of an application currently in a foreground running state, and the second detection result is used to indicate that there is no application currently in the foreground running state.
In another possible implementation manner, the processing module includes:
the first processing unit is used for issuing the sliding cover event to an application program in a foreground running state according to the application identifier if the detection result is the first detection result, and responding to the sliding cover event through the application program in the foreground running state;
and the second processing unit is used for issuing the sliding cover event to a preset application program if the detection result is the second detection result, and responding to the sliding cover event through the preset application program.
In another possible implementation manner, the processing module further includes:
and the third processing unit is used for packaging the sliding cover event in a preset mode if the application program in the foreground running state is a third-party application program installed in the terminal, so that the third-party application program calls a preset interface to respond to the sliding cover event.
In another possible implementation manner, the apparatus further includes:
the determining module is used for determining the type of the sliding cover event, wherein the type comprises a first type and a second type, the first type represents a slide-on event, and the second type represents a slide-off event.
In another possible implementation manner, the processing module includes:
a fourth processing unit, configured to, if the detection result is the first detection result and the type of the slide event is the first type, issue the slide event to an application program in a foreground operating state according to the application identifier, start the front-facing camera through the application program in the foreground operating state, and display a shooting interface for shooting based on the front-facing camera;
and the fifth processing unit is used for issuing the sliding cover event to an application program in a foreground running state according to the application identifier if the detection result is the first detection result and the type of the sliding cover event is the second type, closing the front camera through the application program in the foreground running state, and closing a shooting interface for shooting based on the front camera.
In another possible implementation manner, the processing module includes:
a sixth processing unit, configured to, if the detection result is the second detection result and the type of the slide event is the first type, issue the slide event to a preset application program, start the front-facing camera through the preset application program, and display a shooting interface for shooting based on the front-facing camera;
a seventh processing unit, configured to respond to the slide event including ignoring the slide event if the detection result is the second detection result and the type of the slide event is the second type.
According to a third aspect of the embodiments of the present disclosure, there is provided a slide event response device, the device including:
a processor;
a memory for storing processor-executable instructions;
wherein the processor is configured to:
when a sliding cover event is detected, detecting whether an application program in a foreground running state exists at present to obtain a detection result;
and issuing the sliding cover event to a target application program according to the detection result, and responding to the sliding cover event through the target application program.
According to a fourth aspect of embodiments of the present disclosure, there is provided a computer-readable storage medium having at least one instruction stored therein, the instruction being loaded and executed by a processor to implement the operations performed in the slide event response method according to the first aspect.
According to the method, the device and the storage medium for responding to the sliding cover event, when the terminal detects the sliding cover event, whether the application program in the foreground running state exists or not is detected, and a detection result is obtained; and according to the detection result, issuing the sliding cover event to a target application program, and responding to the sliding cover event through the target application program. The user only needs to execute the sliding event, the sliding event can be issued to the target application program according to whether the application program operated by the foreground exists or not, the response is carried out through the target application program, the operation steps are simplified, the operation efficiency is improved, the problem of confusion caused by the fact that a plurality of application programs respond to the same sliding event is avoided, and the conflict among the application programs is avoided. And whether the application program running in the foreground exists or not can be detected, so that the sliding cover event can be distributed to the application program in the foreground running state as much as possible, the intention of the user for executing the sliding cover event can be determined, and the response mode of the terminal can meet the operation requirement of the user.
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 the structure of a terminal according to an exemplary embodiment;
FIG. 2 is a flow diagram illustrating a slider event response method in accordance with an exemplary embodiment;
FIG. 3A is a flow diagram illustrating another slider event response method in accordance with an exemplary embodiment;
FIG. 3B is a flow diagram illustrating another slider event response method in accordance with an exemplary embodiment;
FIG. 4 is a schematic diagram illustrating a configuration of a slide event response device in accordance with an exemplary embodiment;
fig. 5 is a block diagram illustrating a terminal according to an example embodiment.
Detailed Description
To make the objects, technical solutions and advantages of the present disclosure more apparent, the present disclosure is described in further detail below with reference to the embodiments and the accompanying drawings. The exemplary embodiments and descriptions of the present disclosure are provided herein for illustration of the present disclosure, but not for limitation of the present disclosure.
The embodiment of the disclosure provides a method, a device and a storage medium for responding to a sliding cover event, and the disclosure is described in detail below with reference to the accompanying drawings.
First, as shown in fig. 1, the implementation environment includes a terminal, where the terminal includes a display screen 101 and a host 102 located below the display screen 101, and a user holds the terminal by hand, and presses the display screen 101 and pushes the display screen 101 or pushes the host 102, i.e., a slider event can be triggered on the terminal.
In the first state, the display screen 101 and the host 102 are overlapped, and at this time, the user can concentrate on viewing the content displayed on the display screen 101, and can also trigger a touch operation on the display screen 101 to control the terminal to execute a corresponding response operation.
In the second state, the display screen 101 and the host 102 are not completely overlapped, and the display screen 101 is located above the host 102 and exposes a part of the components of the host 102.
In one possible implementation, a front facing camera 1021 is disposed on a surface of the host 102 opposite the display screen 101. In the first state, the display screen 101 may block the front-facing camera 1021 on the host 102, and at this time, the user may view the content displayed on the display screen 101, trigger a touch operation on the display screen 101, and control the terminal to execute a corresponding response operation.
In the second state, the display screen 101 exposes the front camera 1021 of the host 102. At this time, the user may view the content displayed on the display screen 101, trigger a touch operation on the display screen 101, control the terminal to execute a corresponding response operation, and perform shooting through the front camera 1021.
Then, when the terminal is in the first state, the user may trigger a touch operation on the display screen 101 to push the display screen 101 downward, and the terminal generates a slide-off event to expose the front camera 1021 on the host 102, thereby switching to the second state. When the terminal is in the second state, a touch operation may be triggered on the display screen 101, and the display screen 101 is pushed upward, so that a sliding event occurs in the terminal, and the display screen 101 shields the front camera 1021 on the host 102, thereby switching to the first state.
In the embodiment of the disclosure, when the terminal detects a sliding cover event, whether an application program in a foreground running state exists at present is detected, and a detection result is obtained; and according to the detection result, issuing the sliding cover event to a target application program, and responding to the sliding cover event through the target application program.
Fig. 2 is a flowchart illustrating a slide event response method according to an exemplary embodiment, which is applied to the terminal in the embodiment shown in fig. 1, and as shown in fig. 2, includes the following steps:
in step 201, when a sliding cover event is detected, whether an application program in a foreground running state exists at present is detected, and a detection result is obtained.
In step 202, the sliding event is issued to the target application according to the detection result, and the sliding event is responded by the target application.
In the method provided by the embodiment of the disclosure, when a terminal detects a sliding cover event, whether an application program in a foreground running state exists at present is detected, and a detection result is obtained; and according to the detection result, issuing the sliding cover event to a target application program, and responding to the sliding cover event through the target application program. The user only needs to execute the sliding event, the sliding event can be issued to the target application program according to whether the application program operated by the foreground exists or not, the response is carried out through the target application program, the operation steps are simplified, the operation efficiency is improved, the problem of confusion caused by the fact that a plurality of application programs respond to the same sliding event is avoided, and the conflict among the application programs is avoided. And whether the application program running in the foreground exists or not can be detected, so that the sliding cover event can be distributed to the application program in the foreground running state as much as possible, the intention of the user for executing the sliding cover event can be determined, and the response mode of the terminal can meet the operation requirement of the user.
In a possible implementation manner, the detection result includes a first detection result and a second detection result, the first detection result includes an application identifier of an application currently in a foreground running state, and the second detection result is used to indicate that there is no application currently in the foreground running state.
In another possible implementation manner, issuing the sliding cover event to the target application program according to the detection result, and responding to the sliding cover event by the target application program includes:
if the detection result is the first detection result, the sliding cover event is issued to the application program in the foreground running state according to the application identification, and the sliding cover event is responded through the application program in the foreground running state;
and if the detection result is a second detection result, issuing the sliding closure event to a preset application program, and responding to the sliding closure event through the preset application program.
In another possible implementation manner, issuing the sliding cover event to the application program in the foreground running state according to the application identifier includes:
and if the application program in the foreground running state is a third-party application program installed in the terminal, packaging the sliding cover event in a preset mode, so that the third-party application program calls a preset interface to respond to the sliding cover event.
In another possible implementation manner, the method further includes:
determining the type of the sliding cover event, wherein the type comprises a first type and a second type, the first type represents a sliding-open event, and the second type represents a sliding-close event.
In another possible implementation manner, issuing the sliding cover event to the target application program according to the detection result, and responding to the sliding cover event by the target application program includes:
if the detection result is a first detection result and the type of the sliding cover event is a first type, issuing the sliding cover event to an application program in a foreground running state according to the application identifier, starting a front camera through the application program in the foreground running state, and displaying a shooting interface shot based on the front camera;
and if the detection result is a first detection result and the type of the sliding cover event is a second type, issuing the sliding cover event to an application program in a foreground running state according to the application identifier, closing the front camera through the application program in the foreground running state, and closing a shooting interface for shooting based on the front camera.
In another possible implementation manner, issuing the sliding cover event to the target application program according to the detection result, and responding to the sliding cover event by the target application program includes:
if the detection result is a second detection result and the type of the sliding cover event is a first type, the sliding cover event is issued to a preset application program, the front-facing camera is started through the preset application program, and a shooting interface for shooting based on the front-facing camera is displayed;
and if the detection result is a second detection result and the type of the sliding cover event is a second type, responding to the sliding cover event comprises ignoring the sliding cover event.
Fig. 3A is a flowchart illustrating a method for responding to a slide event according to an exemplary embodiment, and the method is applied to the terminal in the embodiment shown in fig. 1, where the terminal may be a mobile phone, a computer, a tablet computer, or the like. As shown in fig. 3A, the method comprises the following steps:
in step 301, when the terminal detects a slide event, it detects whether an application program in a foreground running state exists currently, and obtains a detection result.
The terminal can run a plurality of application programs, the application programs comprise an application program running in an operating system and a third party application program installed in the terminal, the application program running in the operating system can be a camera program, a face recognition program and the like, and the third party application program can be an instant messaging program, a beauty program, an electronic payment program, an electronic shopping program and the like.
Because a plurality of application programs may be run on the terminal, when the terminal detects a slide event, if the terminal directly responds to the slide event, the plurality of running application programs may all respond to the slide event, confusion occurs, and conflicts among the application programs are also easily generated.
Therefore, when the terminal detects the sliding event, whether the application program in the foreground operation state exists at present can be detected, and the detection result is obtained to determine the target application program responding to the sliding event. The detection result comprises a first detection result and a second detection result, the first detection result comprises an application identifier of the application program currently in the foreground running state, the first detection result is used for indicating that the application program currently in the foreground running state exists, and the second detection result is used for indicating that the application program currently in the foreground running state does not exist.
The application identifier is used for determining the unique corresponding application program, different application programs are different in application identifier, and the terminal can determine the unique application program according to the application identifier. The application identifier may be a name, version information, or application number of the application program, and the application identifier may be in the form of characters or numbers.
In the embodiment of the disclosure, the terminal may determine the operation intention of the user to execute the sliding cover event according to the detection result by detecting whether the application program in the foreground running state exists currently, so as to respond through different target application programs according to different operation intentions of the user.
In step 302, the slide event is issued to the target application according to the detection result, and the slide event is responded by the target application.
In the first case, if the detection result is the first detection result and the application program in the foreground running state currently exists, it indicates that the user executes the sliding cover event for operating in the application program, and the application program is the target application program that the user wishes to respond to the sliding cover event.
The application currently in the foreground running state may be an application running in an operating system, and may also be a third-party application installed in the terminal. And when the application program is the application program running in the operating system, the terminal directly issues the sliding cover event to the application program. And when the application program is a third-party application program installed in the terminal, encapsulating the sliding event in a preset mode, so that the third-party application program calls a preset interface to respond to the sliding event.
The preset interface can be an interface between a third-party application program and an operating system, the operating system interacts with the third-party application program through the preset interface, the preset mode can be a packaging mode specified by the preset interface, after a sliding cover event is packaged in the preset mode, the packaged data can meet the specification of the preset interface, the third-party application program can call the preset interface, the packaged data are obtained, the sliding cover event is analyzed in the preset mode, and the sliding cover event is responded.
In the second case, if the detection result is the second detection result and there is no application program currently in the foreground running state, it may be considered that the user executes the sliding event to perform an operation in the preset application program, so that the preset application program is used as the target application program, the sliding event is issued to the preset application program, the sliding event is responded by the preset application program, and the response mode is determined by the preset application program.
The preset application program may be a certain application program running in the operating system, or may also be a certain third-party application program installed on the terminal, and the preset application program may be set in a unified manner when the terminal leaves a factory, or may be set by a user using the terminal according to a requirement of the user, or may also be an application program most frequently used by the user.
In the method provided by the embodiment of the disclosure, when a terminal detects a sliding cover event, whether an application program in a foreground running state exists at present is detected, and a detection result is obtained; and according to the detection result, issuing the sliding cover event to a target application program, and responding to the sliding cover event through the target application program. The user only needs to execute the sliding event, the sliding event can be issued to the target application program according to whether the application program operated by the foreground exists or not, the response is carried out through the target application program, the operation steps are simplified, the operation efficiency is improved, the problem of confusion caused by the fact that a plurality of application programs respond to the same sliding event is avoided, and the conflict among the application programs is avoided. And whether the application program running in the foreground exists or not can be detected, so that the sliding cover event can be distributed to the application program in the foreground running state as much as possible, the intention of the user for executing the sliding cover event can be determined, and the response mode of the terminal can meet the operation requirement of the user.
On the basis of the embodiment shown in fig. 3A, the embodiment further provides another method for responding to a slide event, and the response method is determined by comprehensively considering the detection result and the type of the slide event. See the examples below for details.
Fig. 3B is a flowchart illustrating a method for responding to a slide event according to an exemplary embodiment, and the method is applied to the terminal in the embodiment shown in fig. 1, where the terminal may be a mobile phone, a computer, a tablet computer, or the like. As shown in fig. 3B, the method comprises the following steps:
in step 311, when the terminal detects a slide event, the type of the slide event is determined.
The slide event includes a slide-on operation and a slide-off operation, and the user triggers the slide-on operation by pushing the display screen downward or pushing the host upward, and triggers the slide-off operation by pushing the display screen upward or pushing the host downward. Accordingly, the types of the slide event include a first type representing a slide-on event and a second type representing a slide-off event. Each time the terminal detects the sliding cover event, the type of the sliding cover event is determined to be a first type or a second type, so that response is carried out according to the type of the sliding cover event.
In one possible implementation, step 311 may be performed by an operating system of the terminal, and the terminal is configured with a sensor for detecting a sliding cover event occurring between the display screen and the host. When the sensor detects that the terminal has a sliding cover event, the type of the sliding cover event is determined, and a sliding cover event notification is sent to the operating system. The sliding event notification includes a type of a sliding event, and the sliding event notification is used for indicating that the sliding event is detected. And the operating system calls an interface of the sensor and receives the sliding cover event notification sent by the sensor so as to determine the type of the sliding cover event.
For example, an interface of the underlying sensor is a SensorManager API (sensor management interface), and a SystemServer (system service process) is created in an operating system of the terminal as a server of the sensor. When the sensor detects that the terminal has a sliding cover event, the type of the sliding cover event is packaged into a sensor event to obtain a sliding cover event notification, and the sliding cover event notification is uploaded to a System Server of an operating system through a sensorManager API, so that the operating system can know that the terminal has the sliding cover event and determine the type of the sliding cover event.
In step 312, the terminal detects whether there is an application program currently in the foreground operating state, and obtains a detection result.
Step 312 is similar to step 301, and will not be described herein.
In the embodiment of the disclosure, the terminal may obtain a detection result by detecting whether the application program in the foreground running state exists currently, determine the type of the sliding cover event, and determine the operation intention of the user for executing the sliding cover event according to the detection result and the type of the sliding cover event, so as to issue the sliding cover event to the target application program according to the operation intention of the user, and respond to the sliding cover event through the target application program.
In the first case, if the detection result is the first detection result and the application program in the foreground running state currently exists, it indicates that the user executes the sliding cover event for operating in the application program, and the application program is the application program that the user wishes to respond to the sliding cover event. And, the response mode is different according to the type of the slide event, and the response process can be referred to as step 313 or 314 below.
In the second case, if the detection result is the second detection result, there is no application program currently in the foreground operation state, but the application program that the user wishes to respond to the slide event cannot be accurately determined, and the response process at this time may be referred to as step 315 or 316 below.
In step 313, if the detection result is the first detection result and the type of the slide event is the first type, the slide event is issued to the application program in the foreground running state according to the application identifier, the front camera is started through the application program in the foreground running state, and a shooting interface for shooting based on the front camera is displayed.
In step 313, taking the case where a front camera is disposed on the surface of the host opposite to the display screen as an example, the purpose of the slide-open operation may be to perform shooting based on the front camera.
If the detection result is the first detection result and the type of the sliding cover event is the first type, the fact that the terminal currently runs a certain application program in the foreground is indicated, and the user executes the sliding-open operation under the condition that the application program is run in the foreground, so that the front-facing camera is exposed, and the user hopes to shoot through the application program. Therefore, the terminal determines the application program currently in the foreground running state according to the application identifier included in the first detection result, issues the sliding cover event to the application program in the foreground running state, starts the front camera through the application program, and displays a shooting interface of the application program for shooting based on the front camera on the display screen, so that a user can conveniently use the front camera to shoot through the shooting interface.
The shooting interface comprises a shooting area and a shooting button. The shooting area comprises the content in the shooting range of the front camera, and a user can shoot through the shooting button. In one possible implementation, the user may take a picture by clicking on the take button, or record a video by pressing the take button too long.
In addition, the host not only comprises a front camera, but also is provided with a rear camera on the surface of the host deviating from the display screen, so that the terminal can display a shooting interface shot by any application program based on the front camera and shoot through the front camera, and can also display a shooting interface shot by any application program based on the rear camera and shoot through the rear camera. The shooting interface based on the rear camera is similar to the shooting interface based on the front camera, and both the two shooting interfaces can comprise a switching button which is used for switching the camera to be adopted and correspondingly switching the displayed shooting interface.
In a possible implementation manner, when the terminal displays the shooting interface of the application program for shooting based on the front-facing camera through the application program, the user can click the switch button, and then the terminal switches the shooting interface for shooting based on the front-facing camera to the shooting interface for shooting based on the rear-facing camera, closes the front-facing camera, and starts the rear-facing camera. Similarly, when the terminal displays the shooting interface shot by the application program based on the rear camera through the application program, the user can click the switching button, then the terminal switches the shooting interface shot by the rear camera to the shooting interface shot by the front camera, closes the rear camera and starts the front camera.
In another possible implementation manner, the application programs run in the foreground of the terminal are different, and the processing manner when the shooting interface is displayed is also different. For example, step 313 may include the following steps 3131 or 3132:
3131. and if the application program in the foreground running state is the camera program, issuing the sliding cover event to the camera program according to the application identifier, starting the front camera through the camera program, and displaying a shooting interface of the camera program for shooting based on the front camera.
In a possible implementation manner, the camera program is in a foreground operating state, the currently displayed shooting interface is a shooting interface for shooting based on the rear camera, and the terminal closes the rear camera through the camera program, starts the front camera, switches the currently displayed shooting interface to the shooting interface for shooting based on the front camera, and displays the shooting interface on the display screen. At this time, the user can shoot a picture by clicking the shooting button, or record a video by long-pressing the shooting button, and the user can switch again by clicking the switching button.
The step 3131 may be performed by an operating system of the terminal, where the camera program runs in the operating system, and when the operating system determines that the type of the slide event is the first type and the detection result is the first detection result, the camera program may be directly invoked to display a shooting interface for the camera program to shoot based on the front camera.
3132. And if the application program in the foreground running state is a third-party application program installed on the terminal, issuing a sliding cover event to the third-party application program according to the application identifier, starting a front camera through the third-party application program, and displaying a shooting interface shot by the third-party application program based on the front camera. And corresponding response operation can be carried out according to the current running state of the third-party application program and the function configured by the third-party application program.
For example, the step 3132 may be executed by an operating system of the terminal, and the operating system calls an interface of the third-party application, issues a front-facing shooting notification to the third-party application, where the front-facing shooting notification is used to instruct the third-party application to shoot based on the front-facing camera, and when the front-facing shooting notification is received by the third-party application, the front-facing camera is started, and displays a shooting interface for shooting based on the front-facing camera.
Taking a third-party application program as an example of an instant messaging program, the terminal issues a sliding cover event to the instant messaging program, starts a front camera through the instant messaging program, and displays a shooting interface of the instant messaging program for shooting based on the front camera.
The terminals can install the same instant messaging program, are associated with the instant messaging server through the instant messaging program, and add friends to the local terminal user in the instant messaging program in a mode of scanning two-dimensional codes or searching accounts and the like, so that interaction with the friends is achieved through the instant messaging server. In the interaction process, each terminal can display an interaction interface between the terminal and the friend in the instant communication program, the interaction interface comprises a text input field, a voice input button, a shooting button, a video call button and the like, and contents such as characters, voice, photos or videos and the like can be sent to the friend through the interaction interface, or the terminal can also carry out video call with the friend.
In a possible implementation manner, if the terminal detects a sliding cover event under the condition that the terminal receives a video call request through the instant messaging program, when the terminal issues the sliding cover event to the third-party application program, the front-facing camera is started through the third-party application program, the video call is connected, and a video call interface shot by the instant messaging program based on the front-facing camera is displayed.
The video call request refers to a request for video call, and the terminal can connect the video call when receiving the video call request, and perform video call with a user who initiates the video call request, or can reject the video call. In the process of video call, the terminal sends the video shot by the local camera to the opposite user, receives the video sent by the opposite user, and displays the videos of both sides in the video call interface. And the video call interface comprises a hang-up button and a switching button, so that a user can terminate the video call by clicking the hang-up button and can switch a camera adopted by the video call by clicking the switching button.
In another possible implementation manner, if the terminal detects a sliding cover event when the terminal displays an interactive interface with a certain friend through the instant messaging program, when the terminal issues the sliding cover event to a third-party application program, the front-facing camera is started through the third-party application program, a shooting interface for shooting based on the front-facing camera is displayed, and a picture or a video is shot through the shooting interface and then sent to the friend. And in the process of displaying the shooting interface, the camera to be adopted can be switched by clicking a switching button on the shooting interface.
It should be noted that, in step 313 of this embodiment, the slide-open operation is taken as an example to call the front camera, and in another embodiment, the slide-open operation may also be used to trigger some preset operations. For example, this step 313 may also be replaced by the following steps: if the detection result is the first detection result and the type of the sliding cover event is the first type, the sliding cover event is issued to the application program in the foreground running state according to the application identifier, and a preset operation is executed through the application program in the foreground running state, wherein the preset operation can be set by the application program or set by a user in the application program, and the preset operation can be an operation of starting a front camera or can be an operation of switching the application program from the foreground running state to the background running state and displaying the operation of a terminal main interface and the like.
In step 314, if the detection result is the first detection result and the type of the slide event is the second type, the slide event is issued to the application program in the foreground running state according to the application identifier, the front camera is closed through the application program in the foreground running state, and the shooting interface for shooting based on the front camera is closed.
In step 314, taking the case that the front camera is disposed on the surface of the host opposite to the display screen as an example, it can be considered that the purpose of the sliding closure operation is to turn off the front camera.
If the detection result is the first detection result and the type of the sliding cover event is the second type, the fact that the terminal currently runs a certain application program in the foreground is indicated, the user executes sliding closure operation under the condition that the application program is run in the foreground, the front-facing camera is hidden, and the user hopes to stop using the front-facing camera. Therefore, the terminal determines the application program currently in the foreground running state according to the application identifier included in the first detection result, issues the sliding cover event to the application program, closes the front-facing camera through the application program, and closes the shooting interface of the application program for shooting based on the front-facing camera.
In a possible implementation manner, the application programs running on the foreground of the terminal are different, and the processing manner when the front-facing camera is turned off is also different. For example, step 314 may include the following steps 3141 or 3142:
3141. and if the application program in the foreground running state is the camera program, issuing the sliding cover event to the camera program according to the application identifier, closing the front camera through the camera program, and closing a shooting interface of the camera program for shooting based on the front camera.
When the shooting interface based on the front camera is closed through the camera program, the shooting interface based on the rear camera can be switched to, or photos or videos in a gallery of the camera program are displayed, or the camera program is quitted, or other response operations can be executed.
3142. And if the application program in the foreground running state is a third-party application program installed on the terminal, issuing a sliding cover event to the third-party application program according to the application identifier, closing the front camera through the third-party application program, and responding according to the current running state of the third-party application program.
For example, the step 3142 may be executed by an operating system of the terminal, and the operating system calls an interface of the third-party application program, and issues a front-end shooting closing notification to the third-party application program, where the front-end shooting closing notification is used to instruct the third-party application program to close a shooting interface for shooting based on a front-end camera, and the third-party application program closes the shooting interface when receiving the front-end shooting closing notification.
When the shooting interface is closed, the shooting interface shot based on the rear camera can be switched to through the third-party application program, or an interface displayed by the third-party application program before the shooting interface is displayed, or a main interface of the third-party application program is displayed, or the third-party application program is quitted to display the main interface of the terminal, or other response operations are executed.
In a possible implementation manner, if the application program in the foreground running state is an instant messaging program and the current terminal is in a video call state, the terminal issues a sliding cover event to the instant messaging program according to the application identifier, closes the front-facing camera through the instant messaging program, hangs up the video call, and returns to the interface displayed before the video call is received.
In another possible implementation manner, if the application program in the foreground running state is an instant messaging program, and the instant messaging program displays an interactive interface with a friend before the shooting interface is displayed, the terminal issues a sliding cover event to the instant messaging program according to the application identifier, closes the front camera through the instant messaging program, switches to a shooting interface for shooting based on the rear camera, and sends a picture or a video shot based on the rear camera to the friend.
It should be noted that, in step 314 of this embodiment, the sliding-off operation is used to turn off the front-facing camera, but in another embodiment, the sliding-off operation may also be used to trigger some preset operations. For example, this step 314 may also be replaced by the following step: if the detection result is the first detection result and the type of the sliding cover event is the second type, the sliding cover event is issued to the application program in the foreground running state according to the application identifier, and a preset operation is executed through the application program in the foreground running state, wherein the preset operation can be set by the application program or set by a user in the application program, and the preset operation can be an operation of closing a front camera, or an operation of displaying a main interface of the application program, or an operation of closing the application program, and the like.
In step 315, if the detection result is the second detection result and the type of the slide event is the first type, the terminal issues the slide event to a preset application program, starts the front-facing camera through the preset application program, and displays a shooting interface for shooting based on the front-facing camera.
In step 315, for example, a front camera is disposed on a surface of the host opposite to the display screen, and the purpose of the slide-open operation may be to perform shooting based on the front camera.
If the detection result is the second detection result and the type of the sliding cover event is the first type, the sliding operation is executed by the user under the condition that the terminal does not run a certain application program in the foreground, the front-facing camera is exposed, and the user wants to use the front-facing camera. At this time, in order to meet the shooting requirement of the user, shooting can be performed through a preset application program. Therefore, the sliding cover event is issued to the preset application program, the preset application program is started, the front camera is started through the preset application program, and a shooting interface for shooting based on the front camera is displayed.
The preset application program may be a certain application program running in the operating system, or may also be a certain third-party application program installed on the terminal, and the preset application program may be set in a unified manner when the terminal leaves a factory, or may be set by a user using the terminal according to a requirement of the user, or may also be an application program most frequently used by the user.
In the embodiment of the disclosure, the display screen of the terminal may be in a screen locking state or an unlocked state, and when the terminal determines that the detection result is the second detection result and the type of the sliding cover event is the first type, the sliding cover event may not be directly issued to the preset application program, but the face unlocking or the preset application program may be determined to be performed or started according to the state of the display screen. Thus, step 315 may include the following steps 3151 or 3152:
3151. if the detection result is a second detection result, the type of the sliding cover event is a first type, and the display screen is in the screen locking state, the sliding cover event is issued to a face unlocking program, the front camera is started through the face unlocking program, a face recognition interface is displayed, the face recognition interface is used for shooting a face image of a current user, face recognition is carried out, the display screen is unlocked after the face image recognition is passed, and the display screen is switched from the screen locking state to the unlocking state.
In the face recognition process, a user places a face in a shooting range of a front-facing camera, a terminal obtains a face image in the shooting range through the front-facing camera, the face image is matched with a preset unlocking face, if the face image is matched successfully, a display screen is unlocked, if the face image is not matched successfully, the unlocking fails, the display screen is continuously kept in a screen locking state, the unlocking is waited, and after the preset duration, the unlocking waiting state is switched to a black screen state. The waiting unlocking state is that a face recognition interface is displayed on a display screen.
The unlocking face can be preset by a user, and the user can shoot the face of the user through the front camera or the rear camera to obtain a face image to serve as the unlocking face.
The user can enable or disable the face unlocking function on the terminal according to the own requirement, and the step 3151 can be applied to the case that the terminal enables the face unlocking function. In another embodiment, when the terminal deactivates the face unlocking function, the terminal does not perform face recognition any more, and issues the sliding cover event to the preset application program instead of the face unlocking program.
3152. If the detection result is a second detection result, the type of the sliding cover event is a first type, and the display screen is in an unlocked state, the sliding cover event is issued to a preset application program, and a shooting interface for shooting based on the front-facing camera is displayed through the preset application program.
When the display screen is in the unlocked state, the sliding cover event is directly issued to the preset application program without face unlocking, so that the user can shoot through the preset application program.
It should be noted that, in step 315 of this embodiment, the slide-open operation is used to invoke the front-facing camera, but in another embodiment, the slide-open operation may also be used to trigger some preset operations. For example, this step 315 may also be replaced by the following steps: and if the detection result is a second detection result and the type of the sliding cover event is the first type, the terminal issues the sliding cover event to a preset application program, and executes preset operation through the preset application program. The preset operation may be set by the preset application program, or set by a user in the preset application program, where the preset operation may be an operation of starting a front-facing camera, or may also be an operation of displaying a main interface of the preset application program, or may also be an operation of calling a photo in a database in the preset application program, and the like.
In step 316, if the detection result is the second detection result and the type of the slide event is the second type, the terminal ignores the slide event.
If no application program in the foreground running state exists currently and the sliding closure event detected by the terminal is sliding closure operation, the terminal ignores the sliding closure event and does not respond to the sliding closure event.
In the method provided by the embodiment of the disclosure, when a terminal detects a sliding cover event, whether an application program in a foreground running state exists at present is detected, and a detection result is obtained; and according to the detection result, issuing the sliding cover event to a target application program, and responding to the sliding cover event through the target application program. The user only needs to execute the sliding event, the sliding event can be issued to the target application program according to whether the application program operated by the foreground exists or not, the response is carried out through the target application program, the operation steps are simplified, the operation efficiency is improved, the problem of confusion caused by the fact that a plurality of application programs respond to the same sliding event is avoided, and the conflict among the application programs is avoided. And whether the application program running in the foreground exists or not can be detected, so that the sliding cover event can be distributed to the application program in the foreground running state as much as possible, the intention of the user for executing the sliding cover event can be determined, and the response mode of the terminal can meet the operation requirement of the user.
And when the sliding cover event is detected, the type of the sliding cover operation is determined, whether the front-facing camera is started or closed is determined according to the type of the sliding cover event, the intention of the user for executing the sliding cover operation can be more accurately determined, the processing mode of the front-facing camera can better meet the operation requirement of the user, different target application programs can be determined according to different sliding cover operation types and different application programs running in the foreground, and flexible control is achieved. Correspondingly, the user can control the front camera only by executing the slide-on event or the slide-off event without executing the operation of starting or closing the front camera on the display screen, so that the operation is very simple and convenient, and the operation efficiency is improved.
And when the application program operated by the foreground is the third-party application program, the sliding event is packaged in a preset mode, so that the packaged data can meet the regulation of the third-party application program, the normal response of the sliding event is ensured, and the confusion caused by different regulations of various third-party application programs is avoided.
And in combination with the current state of the terminal display screen, when the display screen is in the screen locking state, the sliding cover event is issued to the face unlocking program according to the type and the detection result of the sliding cover event, so that the face unlocking flow can be conveniently and quickly triggered, the face unlocking flow is simplified, and the time is saved.
Fig. 4 is a schematic structural diagram of a slide event response device according to an exemplary embodiment, which is applied to the terminal shown in fig. 1, and as shown in fig. 4, the device includes a determination module 401 and a detection module 402.
The detection module 401 is configured to detect whether an application program in a foreground running state exists currently when a sliding cover event is detected, and obtain a detection result;
the processing module 402 is configured to issue the sliding cover event to the target application program according to the detection result, and respond to the sliding cover event through the target application program.
In a possible implementation manner, the detection result includes a first detection result and a second detection result, the first detection result includes an application identifier of an application currently in a foreground running state, and the second detection result is used to indicate that there is no application currently in the foreground running state.
In another possible implementation manner, the processing module 402 includes:
the first processing unit is configured to issue the sliding cover event to the application program in the foreground running state according to the application identifier if the detection result is the first detection result, and respond to the sliding cover event through the application program in the foreground running state;
and the second processing unit is configured to issue the sliding cover event to the preset application program if the detection result is the second detection result, and respond to the sliding cover event through the preset application program.
In another possible implementation manner, the processing module 402 includes:
and the third processing unit is configured to package the sliding event in a preset mode if the application program in the foreground running state is a third-party application program installed in the terminal, so that the third-party application program calls a preset interface to respond to the sliding event.
In another possible implementation manner, the apparatus further includes:
the determining module is configured to determine the type of the sliding cover event, wherein the type comprises a first type and a second type, the first type represents a sliding-open event, and the second type represents a sliding-close event.
In another possible implementation manner, the processing module 402 includes:
the fourth processing unit is configured to issue the sliding cover event to the application program in the foreground running state according to the application identifier if the detection result is the first detection result and the type of the sliding cover event is the first type, start the front camera through the application program in the foreground running state, and display a shooting interface for shooting based on the front camera;
and the fifth processing unit is configured to issue the sliding cover event to the application program in the foreground running state according to the application identifier if the detection result is the first detection result and the type of the sliding cover event is the second type, close the front camera through the application program in the foreground running state, and close a shooting interface for shooting based on the front camera.
In another possible implementation manner, the processing module 402 includes:
the sixth processing unit is configured to issue the sliding cover event to a preset application program if the detection result is the second detection result and the type of the sliding cover event is the first type, start the front-facing camera through the preset application program, and display a shooting interface for shooting based on the front-facing camera;
and the seventh processing unit is configured to respond to the sliding cover event including ignoring the sliding cover event if the detection result is the second detection result and the type of the sliding cover event is the second type.
Fig. 5 is a block diagram illustrating a terminal 500 according to an example embodiment. For example, the terminal 500 may be a mobile phone, a computer, a digital broadcaster, 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. 5, terminal 500 may include one or more of the following components: processing component 502, memory 504, power component 506, multimedia component 508, audio component 510, input/output (I/O) interface 512, sensor component 514, and communication component 516.
The processing component 502 generally controls overall operation of the terminal 500, such as operations associated with display, telephone calls, data communications, camera operations, and recording operations. The processing components 502 may include one or more processors 520 to execute instructions to perform all or a portion of the steps of the methods described above. Further, the processing component 502 can include one or more modules that facilitate interaction between the processing component 502 and other components. For example, the processing component 502 can include a multimedia module to facilitate interaction between the multimedia component 508 and the processing component 502.
The memory 504 is configured to store various types of data to support operations at the terminal 500. Examples of such data include instructions for any application or method operating on terminal 500, contact data, phonebook data, messages, pictures, videos, and so forth. The memory 504 may be implemented by any type or combination of volatile or non-volatile memory devices such as Static Random Access Memory (SRAM), electrically erasable programmable read-only memory (EEPROM), erasable programmable read-only memory (EPROM), programmable read-only memory (PROM), read-only memory (ROM), magnetic memory, flash memory, magnetic or optical disks.
The power components 506 provide power to the various components of the terminal 500. The power components 506 may include a power management system, one or more power sources, and other components associated with generating, managing, and distributing power for the terminal 500.
The multimedia components 508 include a display screen that provides an output interface between the terminal 500 and the user. In some embodiments, the display screen may include a Liquid Crystal Display (LCD) and a Touch Panel (TP). If the display screen includes a touch panel, the display 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 508 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 terminal 500 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 510 is configured to output and/or input audio signals. For example, the audio component 510 includes a Microphone (MIC) configured to receive external audio signals when the terminal 500 is in an operating mode, such as a call mode, a recording mode, and a voice recognition mode. The received audio signals may further be stored in the memory 504 or transmitted via the communication component 516. In some embodiments, audio component 510 further includes a speaker for outputting audio signals.
The I/O interface 512 provides an interface between the processing component 502 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 514 includes one or more sensors for providing various aspects of status assessment for the terminal 500. For example, sensor assembly 514 can detect an open/closed state of terminal 500, relative positioning of components, such as a display and keypad of terminal 500, position changes of terminal 500 or a component of terminal 500, presence or absence of user contact with terminal 500, orientation or acceleration/deceleration of terminal 500, and temperature changes of terminal 500. The sensor assembly 514 may include a proximity sensor configured to detect the presence of a nearby object without any physical contact. The sensor assembly 514 may also include a light sensor, such as a CMOS or CCD image sensor, for use in imaging applications. In some embodiments, the sensor assembly 514 may also include an acceleration sensor, a gyroscope sensor, a magnetic sensor, a pressure sensor, or a temperature sensor.
The communication component 516 is configured to facilitate communications between the terminal 500 and other devices in a wired or wireless manner. The terminal 500 may access a wireless network based on a communication standard, such as Wi-Fi, 2G or 3G, or a combination thereof. In an exemplary embodiment, the communication component 516 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 516 further includes a Near Field Communication (NFC) module to facilitate short-range communications.
In an exemplary embodiment, the terminal 500 may be implemented by one or more Application Specific Integrated Circuits (ASICs), Digital Signal Processors (DSPs), Digital Signal Processing Devices (DSPDs), Programmable Logic Devices (PLDs), Field Programmable Gate Arrays (FPGAs), controllers, micro-controllers, microprocessors or other electronic components for performing the above-described slide event response method.
It should be noted that other components of the terminal 500 besides the display screen may be located in a host of the terminal, the host is located below the display screen, and the front camera is located on a surface of the host opposite to the display screen.
In an exemplary embodiment, a non-transitory computer readable storage medium comprising instructions, such as the memory 504 comprising instructions, executable by the processor 520 of the terminal 500 to perform the above-described method is also provided. For example, the non-transitory computer readable storage medium may be a ROM, a Random Access Memory (RAM), a CD-ROM, a magnetic tape, a floppy disk, an optical data storage device, and the like.
It will be understood by those skilled in the art that all or part of the steps of implementing the above embodiments may be implemented by hardware, or may be implemented by a program instructing relevant hardware, where the program may be stored in an acquisition machine readable storage medium, and the storage medium may be a read-only memory, a magnetic or optical disk, and the like.
The above description is only exemplary of the embodiments of the present disclosure and should not be taken as limiting the disclosure, and any modifications, equivalents, improvements and the like that are within the spirit and principle of the embodiments of the present disclosure are intended to be included within the scope of the embodiments of the present disclosure.

Claims (8)

1. A method for responding to a sliding event is applied to a terminal and comprises the following steps:
when a sliding cover event is detected, detecting whether an application program in a foreground running state exists at present to obtain a detection result, wherein the detection result comprises a first detection result and a second detection result, the first detection result comprises an application identifier of the application program in the foreground running state at present, and the second detection result is used for indicating that the application program in the foreground running state does not exist at present;
determining the type of the sliding cover event, wherein the type comprises a first type and a second type, the first type represents a sliding-open event, and the second type represents a sliding-close event;
according to the detection result, the sliding cover event is issued to a target application program, and the sliding cover event is responded through the target application program;
the issuing the sliding closure event to a target application program according to the detection result, and responding the sliding closure event through the target application program include:
if the detection result is the first detection result and the type of the sliding cover event is the first type, issuing the sliding cover event to an application program in a foreground running state according to the application identifier, starting a front camera through the application program in the foreground running state, and displaying a shooting interface shot by the application program based on the front camera;
if the detection result is the first detection result and the type of the sliding cover event is the second type, the sliding cover event is issued to an application program in a foreground running state according to the application identifier, the front camera is closed through the application program in the foreground running state, and a shooting interface of the application program for shooting based on the front camera is closed;
and if the detection result is the second detection result, issuing the sliding cover event to a preset application program, and responding to the sliding cover event through the preset application program.
2. The method of claim 1, wherein the issuing the slide event to the application program in the foreground running state according to the application identifier comprises:
and if the application program in the foreground running state is a third-party application program installed in the terminal, packaging the sliding cover event in a preset mode, so that the third-party application program calls a preset interface to respond to the sliding cover event.
3. The method of claim 1, wherein the issuing the slide event to a target application according to the detection result, and responding to the slide event by the target application further comprises:
if the detection result is the second detection result and the type of the sliding cover event is the first type, issuing the sliding cover event to a preset application program, starting the front camera through the preset application program, and displaying a shooting interface shot based on the front camera;
and if the detection result is the second detection result and the type of the sliding cover event is the second type, responding to the sliding cover event comprises ignoring the sliding cover event.
4. A slide event response device, which is applied to a terminal, comprising:
the detection module is used for detecting whether the application program in the foreground running state exists currently or not when a sliding cover event is detected, and obtaining a detection result, wherein the detection result comprises a first detection result and a second detection result, the first detection result comprises an application identifier of the application program in the foreground running state currently, and the second detection result is used for indicating that the application program in the foreground running state does not exist currently;
the determining module is used for determining the type of the sliding cover event, wherein the type comprises a first type and a second type, the first type represents a slide-on event, and the second type represents a slide-off event;
the processing module is used for issuing the sliding cover event to a target application program according to the detection result and responding to the sliding cover event through the target application program;
the processing module comprises:
a fourth processing unit, configured to, if the detection result is the first detection result and the type of the slide event is the first type, issue the slide event to an application program in a foreground operating state according to the application identifier, start a front-facing camera through the application program in the foreground operating state, and display a shooting interface for the application program to shoot based on the front-facing camera;
a fifth processing unit, configured to, if the detection result is the first detection result and the type of the slide event is the second type, issue the slide event to an application program in a foreground operating state according to the application identifier, close the front-facing camera by the application program in the foreground operating state, and close a shooting interface of the application program for shooting based on the front-facing camera;
and the second processing unit is used for issuing the sliding cover event to a preset application program if the detection result is the second detection result, and responding to the sliding cover event through the preset application program.
5. The apparatus of claim 4, wherein the processing module further comprises:
and the third processing unit is used for packaging the sliding cover event in a preset mode if the application program in the foreground running state is a third-party application program installed in the terminal, so that the third-party application program calls a preset interface to respond to the sliding cover event.
6. The apparatus of claim 4, wherein the processing module further comprises:
a sixth processing unit, configured to, if the detection result is the second detection result and the type of the slide event is the first type, issue the slide event to a preset application program, start the front-facing camera through the preset application program, and display a shooting interface for shooting based on the front-facing camera;
a seventh processing unit, configured to respond to the slide event including ignoring the slide event if the detection result is the second detection result and the type of the slide event is the second type.
7. A slide event response device, the device comprising:
a processor;
a memory for storing processor-executable instructions;
wherein the processor is configured to:
when a sliding cover event is detected, detecting whether an application program in a foreground running state exists at present to obtain a detection result, wherein the detection result comprises a first detection result and a second detection result, the first detection result comprises an application identifier of the application program in the foreground running state at present, and the second detection result is used for indicating that the application program in the foreground running state does not exist at present;
determining the type of the sliding cover event, wherein the type comprises a first type and a second type, the first type represents a sliding-open event, and the second type represents a sliding-close event;
according to the detection result, the sliding cover event is issued to a target application program, and the sliding cover event is responded through the target application program;
the issuing the sliding closure event to a target application program according to the detection result, and responding the sliding closure event through the target application program include:
if the detection result is the first detection result and the type of the sliding cover event is the first type, issuing the sliding cover event to an application program in a foreground running state according to the application identifier, starting a front camera through the application program in the foreground running state, and displaying a shooting interface shot by the application program based on the front camera;
if the detection result is the first detection result and the type of the sliding cover event is the second type, the sliding cover event is issued to an application program in a foreground running state according to the application identifier, the front camera is closed through the application program in the foreground running state, and a shooting interface of the application program for shooting based on the front camera is closed;
and if the detection result is the second detection result, issuing the sliding cover event to a preset application program, and responding to the sliding cover event through the preset application program.
8. A computer-readable storage medium having at least one instruction stored therein, the instruction being loaded and executed by a processor to implement the operations performed in the slide event response method according to any one of claims 1 to 3.
CN201811223856.XA 2018-10-19 2018-10-19 Sliding cover event response method and device and storage medium Active CN109445672B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201811223856.XA CN109445672B (en) 2018-10-19 2018-10-19 Sliding cover event response method and device and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201811223856.XA CN109445672B (en) 2018-10-19 2018-10-19 Sliding cover event response method and device and storage medium

Publications (2)

Publication Number Publication Date
CN109445672A CN109445672A (en) 2019-03-08
CN109445672B true CN109445672B (en) 2021-02-09

Family

ID=65547028

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201811223856.XA Active CN109445672B (en) 2018-10-19 2018-10-19 Sliding cover event response method and device and storage medium

Country Status (1)

Country Link
CN (1) CN109445672B (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111539037A (en) * 2020-04-24 2020-08-14 联想(北京)有限公司 Control method and device and electronic equipment

Citations (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104049851A (en) * 2013-03-11 2014-09-17 联想(北京)有限公司 Control method and device and electronic equipment

Family Cites Families (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US10474409B2 (en) * 2014-09-19 2019-11-12 Lenovo (Beijing) Co., Ltd. Response control method and electronic device
KR102471183B1 (en) * 2015-10-14 2022-11-25 엘지이노텍 주식회사 Lens module and camera assembly including the same
CN107295127A (en) * 2017-06-30 2017-10-24 联想(北京)有限公司 Handheld device and its application method
CN108012052A (en) * 2017-11-07 2018-05-08 广东欧珀移动通信有限公司 Mobile terminal
CN108664317A (en) * 2018-04-24 2018-10-16 Oppo广东移动通信有限公司 Application switching method, device, mobile terminal and storage medium

Patent Citations (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104049851A (en) * 2013-03-11 2014-09-17 联想(北京)有限公司 Control method and device and electronic equipment

Also Published As

Publication number Publication date
CN109445672A (en) 2019-03-08

Similar Documents

Publication Publication Date Title
CN107908351B (en) Application interface display method and device and storage medium
WO2016192323A1 (en) Video communication method and device
CN106528081B (en) Operation execution method and device
CN107193553B (en) Key control method and device
CN105786507B (en) Display interface switching method and device
US11132123B2 (en) Key display method, terminal, and non-transitory computer-readable medium
CN107562349B (en) Method and device for executing processing
CN107526591B (en) Method and device for switching types of live broadcast rooms
CN106775202B (en) Information transmission method and device
CN109976861B (en) Interactive interface display method and device and storage medium
CN107885418B (en) Terminal, split screen display method and device
CN110262692B (en) Touch screen scanning method, device and medium
US20210165820A1 (en) Method and apparatus for recalling image file, control method and apparatus for recalling image file, and mobile terminal
CN105912204B (en) Method and device for starting application interface
CN113032030A (en) Camera starting method and device, terminal equipment and storage medium
CN108011990B (en) Contact management method and device
CN112291631A (en) Information acquisition method, device, terminal and storage medium
CN107729098B (en) User interface display method and device
US20220159336A1 (en) Method and system for displaying screen
CN104572230B (en) Script file loading method and device and script file generating method and device
CN106878654B (en) Video communication method and device
CN109445672B (en) Sliding cover event response method and device and storage medium
CN112181265B (en) Touch signal processing method, device and medium
CN110213062B (en) Method and device for processing message
CN108829473B (en) Event response method, device and storage medium

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