CN114285937B - Touch method and device for off-screen heart rate detection and computer readable storage medium - Google Patents

Touch method and device for off-screen heart rate detection and computer readable storage medium Download PDF

Info

Publication number
CN114285937B
CN114285937B CN202111552639.7A CN202111552639A CN114285937B CN 114285937 B CN114285937 B CN 114285937B CN 202111552639 A CN202111552639 A CN 202111552639A CN 114285937 B CN114285937 B CN 114285937B
Authority
CN
China
Prior art keywords
heart rate
rate detection
window
touch
event
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
CN202111552639.7A
Other languages
Chinese (zh)
Other versions
CN114285937A (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.)
Shenzhen Zte Mobile Software Co ltd
Original Assignee
Shenzhen Zte 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 Shenzhen Zte Mobile Software Co ltd filed Critical Shenzhen Zte Mobile Software Co ltd
Priority to CN202111552639.7A priority Critical patent/CN114285937B/en
Publication of CN114285937A publication Critical patent/CN114285937A/en
Application granted granted Critical
Publication of CN114285937B publication Critical patent/CN114285937B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Landscapes

  • Telephone Function (AREA)
  • User Interface Of Digital Computer (AREA)

Abstract

The invention discloses an off-screen heart rate detection touch method, equipment and a computer readable storage medium, wherein the method comprises the following steps: acquiring window management service in a heart rate detection interface, and setting attribute parameters of a heart rate detection window through the window management service; determining that the event of the peripheral area of the heart rate window is processed by the window corresponding to the peripheral area through the attribute parameters, and setting the position of the fingerprint identification area as the position of the heart rate detection window; creating a window view of heart rate detection, and adding the window view and the attribute parameters to the window management service; and when the heart rate detection window receives an initial pressing event, starting heart rate detection and entering a preset locking state, and shielding a subsequent pressing event. The heart rate detection touch control scheme with higher stability is realized, the fault tolerance of heart rate detection is improved, and the user experience of the function is enhanced.

Description

Touch method and device for off-screen heart rate detection and computer readable storage medium
Technical Field
The present invention relates to the field of mobile communications, and in particular, to an off-screen heart rate detection touch method, apparatus, and computer readable storage medium.
Background
In the prior art, with the continuous development of intelligent terminal equipment, many devices such as mobile phones on the market all support under-screen test heart rate, namely, fingers press on a heart rate test area for 15 seconds, and the heart rate can be detected. The principle is that the screen emits green light to the finger, the light reflected by the finger tissue is received by the photosensitive sensor and converted into electric signal, and the electric signal is converted into digital signal by analog-to-digital conversion, while the blood is sensitive to green light, the blood vessels of the finger are densely distributed, and when the blood flow of the finger causes the digital signal of the reflected light to change, the change frequency is heart rate.
However, most of the devices such as mobile phones currently popular are full screen mobile phones, large screens, curved edges, and some mobile phone heart rate detection areas are located relatively above the bottom. If the comprehensive screen mobile phone does not wear the mobile phone shell, a user tests the heart rate by one hand, when the heart rate detection area is pressed by one hand thumb, the palm flesh of the thumb root is likely to touch the edge area of the screen, the screen focus is preempted, the pressing heart rate detection area does not react, and the detection cannot be started normally.
To sum up, in the prior art, when detecting the heart rate with one hand for a full-screen mobile phone, the palm flesh of the thumb root easily appears touching the screen edge, preempting the screen focus, resulting in pressing the heart rate detection area and not reacting, unable normal open detection's problem.
Disclosure of Invention
In order to solve the technical defects in the prior art, the invention provides an off-screen heart rate detection touch control method, which comprises the following steps:
and acquiring window management service in the heart rate detection interface, and setting attribute parameters of a heart rate detection window through the window management service.
And determining the event of the peripheral area of the heart rate window through the attribute parameters, processing the event by the window corresponding to the peripheral area, and setting the position of the fingerprint identification area as the position of the heart rate detection window.
Creating a window view of heart rate detection and adding the window view and the attribute parameters to the window management service.
And processing the touch event of the heart rate detection window through the window view, wherein when the heart rate detection window receives an initial pressing event, the heart rate detection is started and enters a preset locking state, and meanwhile, the subsequent pressing event is shielded.
Optionally, the acquiring a window management service in the heart rate detection interface, setting attribute parameters of the heart rate detection window through the window management service includes:
and acquiring window management service Window manager in the heart rate detection interface.
And setting an attribute parameter Window manager.
Optionally, the event of determining the peripheral area of the heart rate window through the attribute parameter is processed by a window corresponding to the peripheral area, and setting the position of the fingerprint identification area as the position of the heart rate detection window includes:
and adding a first identifier Window manager, layoutParms, FLAG_NOT_FOCUSABLE into the attribute parameters Window manager, layoutParms.
And shielding the pressing event through the first identifier in the attribute parameter windowmanager.
Optionally, the event of determining the peripheral area of the heart rate window through the attribute parameter is processed by a window corresponding to the peripheral area, and the position of the fingerprint identification area is set as the position of the heart rate detection window, which further includes:
and adding a second identifier, namely WindowManager, layoutParams, FLAG_NOT_TOUCH_MODUAL and a third identifier, namely WindowManager, layoutParams, FLAG_WATCH_OUTSIDE_TOUCH, into the attribute parameters.
And determining an event of a peripheral region of the heart rate window by the second identifier windowmanager, layoutparameters, flag_not_touch_mode in the attribute parameters windowmanager, layoutparameters, flag_WATCH_OUTSIDE_touch, and processing the event of the peripheral region of the heart rate window by the window corresponding to the peripheral region.
Optionally, the creating a window view of heart rate detection and adding the window view and the attribute parameter to the window management service includes:
a window view of heart rate detection is created and named mcackview.
And adding the named mCheckView of the window view window and the attribute parameter Window manager.
Optionally, the processing the touch event of the heart rate detection window through the window view, where when the heart rate detection window receives an initial pressing event, the heart rate detection is turned on and enters a preset locked state, and at the same time, a subsequent pressing event is masked, including:
and processing the received touch event in the window view by adopting an onTouchEvent callback method.
When a touch event motionaction DOWN is received, heart rate detection is turned on.
Optionally, the processing the touch event of the heart rate detection window through the window view, where when the heart rate detection window receives an initial pressing event, the heart rate detection is started and enters a preset locked state, and at the same time, a subsequent pressing event is masked, and further includes:
and starting heart rate detection and entering a preset locking state.
The subsequent press event action_pointer_down is masked.
Optionally, the acquiring a window management service in the heart rate detection interface, setting attribute parameters of the heart rate detection window through the window management service, previously includes:
a transparent floating view is added to the region containing heart rate detection within the heart rate detection interface.
In the floating view, a multi-finger touch event is processed in an onTouchEvent callback method, wherein when a pressing event motion_POINTER_DOWN or a pressing event motion_POINTER_DOWN is received, whether the pressing event is located in a heart rate detection area or not is calculated according to the coordinate value of the pressing event, if so, heart rate detection is started, and the locking state is entered.
The invention also provides an off-screen heart rate detection touch device, which comprises a memory, a processor and a computer program stored on the memory and capable of running on the processor, wherein the computer program realizes the steps of the off-screen heart rate detection touch method according to any one of the above when being executed by the processor.
The invention also provides a computer readable storage medium, on which an off-screen heart rate detection touch program is stored, which when executed by a processor, implements the steps of the off-screen heart rate detection touch method as described in any one of the above.
By implementing the on-screen heart rate detection touch method, the on-screen heart rate detection touch equipment and the computer readable storage medium, window management services are acquired in a heart rate detection interface, and attribute parameters of a heart rate detection window are set through the window management services; determining that the event of the peripheral area of the heart rate window is processed by the window corresponding to the peripheral area through the attribute parameters, and setting the position of the fingerprint identification area as the position of the heart rate detection window; creating a window view of heart rate detection, and adding the window view and the attribute parameters to the window management service; and processing the touch event of the heart rate detection window through the window view, wherein when the heart rate detection window receives an initial pressing event, the heart rate detection is started and enters a preset locking state, and meanwhile, the subsequent pressing event is shielded. The heart rate detection touch control scheme with higher stability is realized, the fault tolerance of heart rate detection is improved, and the user experience of the function is enhanced.
Drawings
The invention will be further described with reference to the accompanying drawings and examples, in which:
fig. 1 is a schematic diagram of a hardware structure of a mobile terminal according to the present invention;
fig. 2 is a schematic diagram of a communication network system according to an embodiment of the present invention;
FIG. 3 is a flowchart of a first embodiment of an on-screen heart rate detection touch method of the present invention;
FIG. 4 is a flowchart of a second embodiment of an on-screen heart rate detection touch method of the present invention;
FIG. 5 is a flowchart of a third embodiment of an on-screen heart rate detection touch method according to the present invention;
FIG. 6 is a flowchart of a fourth embodiment of an on-screen heart rate detection touch method of the present invention;
FIG. 7 is a flowchart of a fifth embodiment of an on-screen heart rate detection touch method according to the present invention;
FIG. 8 is a flowchart of a sixth embodiment of an on-screen heart rate detection touch method of the present invention;
FIG. 9 is a flowchart of a seventh embodiment of an on-screen heart rate detection touch method of the present invention;
fig. 10 is a flowchart of an eighth embodiment of an on-screen heart rate detection touch method according to the present invention.
Detailed Description
It should be understood that the specific embodiments described herein are for purposes of illustration only and are not intended to limit the scope of the invention.
In the following description, suffixes such as "module", "component", or "unit" for representing elements are used only for facilitating the description of the present invention, and have no specific meaning per se. Thus, "module," "component," or "unit" may be used in combination.
The terminal may be implemented in various forms. For example, the terminals described in the present invention may include mobile terminals such as cell phones, tablet computers, notebook computers, palm computers, personal digital assistants (Personal Digital Assistant, PDA), portable media players (Portable Media Player, PMP), navigation devices, wearable devices, smart bracelets, pedometers, and fixed terminals such as digital TVs, desktop computers, and the like.
The following description will be given taking a mobile terminal as an example, and those skilled in the art will understand that the configuration according to the embodiment of the present invention can be applied to a fixed type terminal in addition to elements particularly used for a moving purpose.
Referring to fig. 1, which is a schematic diagram of a hardware structure of a mobile terminal implementing various embodiments of the present invention, the mobile terminal 100 may include: an RF (Radio Frequency) unit 101, a WiFi module 102, an audio output unit 103, an a/V (audio/video) input unit 104, a sensor 105, a display unit 106, a user input unit 107, an interface unit 108, a memory 109, a processor 110, and a power supply 111. Those skilled in the art will appreciate that the mobile terminal structure shown in fig. 1 is not limiting of the mobile terminal and that the mobile terminal may include more or fewer components than shown, or may combine certain components, or a different arrangement of components.
The following describes the components of the mobile terminal in detail with reference to fig. 1:
the radio frequency unit 101 may be used for receiving and transmitting signals during the information receiving or communication process, specifically, after receiving downlink information of the base station, processing the downlink information by the processor 110; and, the uplink data is transmitted to the base station. Typically, the radio frequency unit 101 includes, but is not limited to, an antenna, at least one amplifier, a transceiver, a coupler, a low noise amplifier, a duplexer, and the like. In addition, the radio frequency unit 101 may also communicate with networks and other devices via wireless communications. The wireless communication may use any communication standard or protocol, including but not limited to GSM (Global System of Mobile communication, global System for Mobile communications), GPRS (General Packet Radio Service ), CDMA2000 (Code Division Multiple Access, CDMA 2000), WCDMA (Wideband Code Division Multiple Access ), TD-SCDMA (Time Division-Synchronous Code Division Multiple Access, time Division synchronous code Division multiple Access), FDD-LTE (Frequency Division Duplexing-Long Term Evolution, frequency Division Duplex Long term evolution), and TDD-LTE (Time Division Duplexing-Long Term Evolution, time Division Duplex Long term evolution), etc.
WiFi belongs to a short-distance wireless transmission technology, and a mobile terminal can help a user to send and receive e-mails, browse web pages, access streaming media and the like through the WiFi module 102, so that wireless broadband Internet access is provided for the user. Although fig. 1 shows a WiFi module 102, it is understood that it does not belong to the necessary constitution of a mobile terminal, and can be omitted entirely as required within a range that does not change the essence of the invention.
The audio output unit 103 may convert audio data received by the radio frequency unit 101 or the WiFi module 102 or stored in the memory 109 into an audio signal and output as sound when the mobile terminal 100 is in a call signal reception mode, a talk mode, a recording mode, a voice recognition mode, a broadcast reception mode, or the like. Also, the audio output unit 103 may also provide audio output (e.g., a call signal reception sound, a message reception sound, etc.) related to a specific function performed by the mobile terminal 100. The audio output unit 103 may include a speaker, a buzzer, and the like.
The a/V input unit 104 is used to receive an audio or video signal. The a/V input unit 104 may include a graphics processor (Graphics Processing Unit, GPU) 1041 and a microphone 1042, the graphics processor 1041 processing image data of still pictures or video obtained by an image capturing device (e.g., a camera) in a video capturing mode or an image capturing mode. The processed image frames may be displayed on the display unit 106. The image frames processed by the graphics processor 1041 may be stored in the memory 109 (or other storage medium) or transmitted via the radio frequency unit 101 or the WiFi module 102. The microphone 1042 can receive sound (audio data) via the microphone 1042 in a phone call mode, a recording mode, a voice recognition mode, and the like, and can process such sound into audio data. The processed audio (voice) data may be converted into a format output that can be transmitted to the mobile communication base station via the radio frequency unit 101 in the case of a telephone call mode. The microphone 1042 may implement various types of noise cancellation (or suppression) algorithms to cancel (or suppress) noise or interference generated in the course of receiving and transmitting the audio signal.
The mobile terminal 100 also includes at least one sensor 105, such as a light sensor, a motion sensor, and other sensors. Specifically, the light sensor includes an ambient light sensor and a proximity sensor, wherein the ambient light sensor can adjust the brightness of the display panel 1061 according to the brightness of ambient light, and the proximity sensor can turn off the display panel 1061 and/or the backlight when the mobile terminal 100 moves to the ear. As one of the motion sensors, the accelerometer sensor can detect the acceleration in all directions (generally three axes), and can detect the gravity and direction when stationary, and can be used for applications of recognizing the gesture of a mobile phone (such as horizontal and vertical screen switching, related games, magnetometer gesture calibration), vibration recognition related functions (such as pedometer and knocking), and the like; as for other sensors such as fingerprint sensors, pressure sensors, iris sensors, molecular sensors, gyroscopes, barometers, hygrometers, thermometers, infrared sensors, etc. that may also be configured in the mobile phone, the detailed description thereof will be omitted.
The display unit 106 is used to display information input by a user or information provided to the user. The display unit 106 may include a display panel 1061, and the display panel 1061 may be configured in the form of a liquid crystal display (Liquid Crystal Display, LCD), an Organic Light-Emitting Diode (OLED), or the like.
The user input unit 107 may be used to receive input numeric or character information and to generate key signal inputs related to user settings and function control of the mobile terminal. In particular, the user input unit 107 may include a touch panel 1071 and other input devices 1072. The touch panel 1071, also referred to as a touch screen, may collect touch operations thereon or thereabout by a user (e.g., operations of the user on the touch panel 1071 or thereabout by using any suitable object or accessory such as a finger, a stylus, etc.) and drive the corresponding connection device according to a predetermined program. The touch panel 1071 may include two parts of a touch detection device and a touch controller. The touch detection device detects the touch azimuth of a user, detects a signal brought by touch operation and transmits the signal to the touch controller; the touch controller receives touch information from the touch detection device, converts it into touch point coordinates, and sends the touch point coordinates to the processor 110, and can receive and execute commands sent from the processor 110. Further, the touch panel 1071 may be implemented in various types such as resistive, capacitive, infrared, and surface acoustic wave. The user input unit 107 may include other input devices 1072 in addition to the touch panel 1071. In particular, other input devices 1072 may include, but are not limited to, one or more of a physical keyboard, function keys (e.g., volume control keys, switch keys, etc.), a trackball, mouse, joystick, etc., as specifically not limited herein.
Further, the touch panel 1071 may overlay the display panel 1061, and when the touch panel 1071 detects a touch operation thereon or thereabout, the touch panel 1071 is transferred to the processor 110 to determine the type of touch event, and then the processor 110 provides a corresponding visual output on the display panel 1061 according to the type of touch event. Although in fig. 1, the touch panel 1071 and the display panel 1061 are two independent components for implementing the input and output functions of the mobile terminal, in some embodiments, the touch panel 1071 may be integrated with the display panel 1061 to implement the input and output functions of the mobile terminal, which is not limited herein.
The interface unit 108 serves as an interface through which at least one external device can be connected with the mobile terminal 100. For example, the external devices may include a wired or wireless headset port, an external power (or battery charger) port, a wired or wireless data port, a memory card port, a port for connecting a device having an identification module, an audio input/output (I/O) port, a video I/O port, an earphone port, and the like. The interface unit 108 may be used to receive input (e.g., data information, power, etc.) from an external device and transmit the received input to one or more elements within the mobile terminal 100 or may be used to transmit data between the mobile terminal 100 and an external device.
Memory 109 may be used to store software programs as well as various data. The memory 109 may mainly include a storage program area that may store an operating system, application programs required for at least one function (such as a sound playing function, an image playing function, etc.), and a storage data area; the storage data area may store data (such as audio data, phonebook, etc.) created according to the use of the handset, etc. In addition, memory 109 may include high-speed random access memory, and may also include non-volatile memory, such as at least one magnetic disk storage device, flash memory device, or other volatile solid-state storage device.
The processor 110 is a control center of the mobile terminal, connects various parts of the entire mobile terminal using various interfaces and lines, and performs various functions of the mobile terminal and processes data by running or executing software programs and/or modules stored in the memory 109 and calling data stored in the memory 109, thereby performing overall monitoring of the mobile terminal. Processor 110 may include one or more processing units; preferably, the processor 110 may integrate an application processor that primarily handles operating systems, user interfaces, applications, etc., with a modem processor that primarily handles wireless communications. It will be appreciated that the modem processor described above may not be integrated into the processor 110.
The mobile terminal 100 may further include a power source 111 (e.g., a battery) for supplying power to the respective components, and preferably, the power source 111 may be logically connected to the processor 110 through a power management system, so as to perform functions of managing charging, discharging, and power consumption management through the power management system.
Although not shown in fig. 1, the mobile terminal 100 may further include a bluetooth module or the like, which is not described herein.
In order to facilitate understanding of the embodiments of the present invention, a communication network system on which the mobile terminal of the present invention is based will be described below.
Referring to fig. 2, fig. 2 is a schematic diagram of a communication network system according to an embodiment of the present invention, where the communication network system is an LTE system of a general mobile communication technology, and the LTE system includes a UE (User Equipment) 201, an e-UTRAN (Evolved UMTS Terrestrial Radio Access Network ) 202, an epc (Evolved Packet Core, evolved packet core) 203, and an IP service 204 of an operator that are sequentially connected in communication.
Specifically, the UE201 may be the terminal 100 described above, and will not be described herein.
The E-UTRAN202 includes eNodeB2021 and other eNodeB2022, etc. The eNodeB2021 may be connected with other eNodeB2022 by a backhaul (e.g., an X2 interface), the eNodeB2021 is connected to the EPC203, and the eNodeB2021 may provide access from the UE201 to the EPC 203.
EPC203 may include MME (Mobility Management Entity ) 2031, hss (Home Subscriber Server, home subscriber server) 2032, other MMEs 2033, SGW (Serving Gate Way) 2034, pgw (PDN Gate Way) 2035 and PCRF (Policy and Charging Rules Function, policy and tariff function entity) 2036, and so on. The MME2031 is a control node that handles signaling between the UE201 and EPC203, providing bearer and connection management. HSS2032 is used to provide registers to manage functions such as home location registers (not shown) and to hold user specific information about service characteristics, data rates, etc. All user data may be sent through SGW2034 and PGW2035 may provide IP address allocation and other functions for UE201, PCRF2036 is a policy and charging control policy decision point for traffic data flows and IP bearer resources, which selects and provides available policy and charging control decisions for a policy and charging enforcement function (not shown).
IP services 204 may include the internet, intranets, IMS (IP Multimedia Subsystem ), or other IP services, etc.
Although the LTE system is described above as an example, it should be understood by those skilled in the art that the present invention is not limited to LTE systems, but may be applied to other wireless communication systems, such as GSM, CDMA2000, WCDMA, TD-SCDMA, and future new network systems.
Based on the above mobile terminal hardware structure and the communication network system, various embodiments of the method of the present invention are provided.
Example 1
Fig. 3 is a flowchart of a first embodiment of an on-screen heart rate detection touch method according to the present invention. An off-screen heart rate detection touch method, the method comprising:
s1, acquiring a window management service in a heart rate detection interface, and setting attribute parameters of a heart rate detection window through the window management service.
S2, determining that events in the peripheral area of the heart rate window are processed by the window corresponding to the peripheral area through the attribute parameters, and setting the position of the fingerprint identification area as the position of the heart rate detection window.
S3, creating a window view of heart rate detection, and adding the window view and the attribute parameters to the window management service.
S4, processing a touch event of the heart rate detection window through the window view, wherein when the heart rate detection window receives an initial pressing event, starting heart rate detection and entering a preset locking state, and shielding a subsequent pressing event.
In this embodiment, in the heart rate detection interface, firstly, a window manager windows manager is acquired, then, the layout attribute parameter windows manager is set, windows is added, and key events are NOT received. The events of the area OUTSIDE the window can be transmitted to the following window process, so that the clicking event OUTSIDE the heart rate detection area is NOT affected. The events can be handled by adding windows manager. The position of the window is set as the position of the fingerprint area, and the size of the window is set as the size of the fingerprint area.
In this embodiment, a window view of heart rate detection is created, named mcackview, and the window parameters of windows manager, layoutparameters, set in step 1, are added to the window manager, so that a heart rate detection window is created.
In this embodiment, touch events are handled in the ontouch method of the window view of heart rate detection, and when a motionevent. Action_down event is received, heart rate detection is turned on, and the state is locked, and the subsequent motionevent. Action_pointer_down no longer responds.
In this embodiment, the heart rate detection is ended if a motion event. Action_cancel, motion event. Action_up event is received within 15 seconds of the heart rate detection.
The method has the advantages that the window management service is acquired in the heart rate detection interface, and the attribute parameters of the heart rate detection window are set through the window management service; determining that the event of the peripheral area of the heart rate window is processed by the window corresponding to the peripheral area through the attribute parameters, and setting the position of the fingerprint identification area as the position of the heart rate detection window; creating a window view of heart rate detection, and adding the window view and the attribute parameters to the window management service; and processing the touch event of the heart rate detection window through the window view, wherein when the heart rate detection window receives an initial pressing event, the heart rate detection is started and enters a preset locking state, and meanwhile, the subsequent pressing event is shielded. The heart rate detection touch control scheme with higher stability is realized, the fault tolerance of heart rate detection is improved, and the user experience of the function is enhanced.
Example two
Fig. 4 is a flowchart of a second embodiment of an on-screen heart rate detection touch method according to the present invention, based on the above embodiment, the acquiring a window management service in the heart rate detection interface, setting, by using the window management service, attribute parameters of a heart rate detection window, including:
s11, acquiring window management service Window manager in the heart rate detection interface.
And S12, setting an attribute parameter Window manager.
The method has the advantages that window management service Window manager is obtained in the heart rate detection interface; and setting an attribute parameter Window manager. The heart rate detection touch control scheme with higher stability is realized, the fault tolerance of heart rate detection is improved, and the user experience of the function is enhanced.
Example III
Fig. 5 is a flowchart of a third embodiment of an on-screen heart rate detection touch method according to the present invention, based on the above embodiment, the event of determining, by the attribute parameter, a peripheral area of the heart rate window is processed by a window corresponding to the peripheral area, and setting a location of a fingerprint identification area as a location of the heart rate detection window includes:
s21, adding a first identifier WindowManager, layoutParms, FLAG_NOT_FOCUSABLE in the attribute parameter WindowManager, layoutParms.
S22, shielding the pressing event through the first identifier WindowManager.LayoutParms.FLAG_NOT_FOCUSABLE in the attribute parameter WindowManager.LayoutParms.
The embodiment has the beneficial effects that the first identifier windowmanager, layoutParms, FLAG_NOT_FOCUSABLE is added to the attribute parameter windowmanager, layoutParms; and shielding the pressing event through the first identifier in the attribute parameter windowmanager. The heart rate detection touch control scheme with higher stability is realized, the fault tolerance of heart rate detection is improved, and the user experience of the function is enhanced.
Example IV
Fig. 6 is a flowchart of a fourth embodiment of an on-screen heart rate detection touch method according to the present invention, based on the above embodiment, the event of determining, by the attribute parameter, a peripheral area of the heart rate window is processed by a window corresponding to the peripheral area, and setting a position of a fingerprint identification area as a position of the heart rate detection window, and further includes:
s23, adding a second identifier WindowManager, layoutParms, FLAG_NOT_TOUCH_MODUAL and a third identifier WindowManager, layoutParms, FLAG_WATCH_OUTSIDE_TOUCH into the attribute parameters.
S24, determining that an event in a peripheral area of the heart rate window is processed by a window corresponding to the peripheral area through the second identifier Window manager.
The embodiment has the beneficial effects that the second identifier windowmanager, layoutParms, FLAG_NOT_TOUCH_MODUAL and the third identifier windowmanager, layoutParms, FLAG_WATCH_OUTSIDE_TOUCH are added to the attribute parameters windowmanager, layoutParms; and determining an event of a peripheral region of the heart rate window by the second identifier windowmanager, layoutparameters, flag_not_touch_mode in the attribute parameters windowmanager, layoutparameters, flag_WATCH_OUTSIDE_touch, and processing the event of the peripheral region of the heart rate window by the window corresponding to the peripheral region. The heart rate detection touch control scheme with higher stability is realized, the fault tolerance of heart rate detection is improved, and the user experience of the function is enhanced.
Example five
Fig. 7 is a flowchart of a fifth embodiment of an on-screen heart rate detection touch method according to the present invention, based on the above embodiment, the creating a window view of heart rate detection, and adding the window view and the attribute parameter to the window management service includes:
s31, creating a window view of heart rate detection, and naming the window view as mCheckView.
S32, adding the named mCheckView of the window view window and the attribute parameter Window manager.
The embodiment has the advantages that the window view of heart rate detection is created and named mCheckView; and adding the named mCheckView of the window view window and the attribute parameter Window manager. The heart rate detection touch control scheme with higher stability is realized, the fault tolerance of heart rate detection is improved, and the user experience of the function is enhanced.
Example six
Fig. 8 is a flowchart of a sixth embodiment of an on-screen heart rate detection touch method according to the present invention, based on the above embodiment, the processing, through the window view, a touch event of the heart rate detection window, where when the heart rate detection window receives an initial pressing event, the heart rate detection is turned on and enters a preset locked state, and at the same time, a subsequent pressing event is masked, including:
s41, processing the received touch event in the window view window by adopting an onTouchEvent callback method.
And S42, when a touch event activity_DOWN is received, starting heart rate detection.
The method has the advantages that the received touch event is processed in the method of the onTouchEvent callback in the window view; when a touch event motionaction DOWN is received, heart rate detection is turned on. The heart rate detection touch control scheme with higher stability is realized, the fault tolerance of heart rate detection is improved, and the user experience of the function is enhanced.
Example seven
Fig. 9 is a flowchart of a seventh embodiment of an on-screen heart rate detection touch method according to the present invention, based on the foregoing embodiment, the processing, by using the window view, a touch event of the heart rate detection window, where when the heart rate detection window receives an initial pressing event, the heart rate detection is turned on and enters a preset locked state, and at the same time, a subsequent pressing event is masked, and further includes:
s43, starting heart rate detection and entering a preset locking state.
S44, shielding a subsequent pressing event action_POINTER_DOWN.
The embodiment has the beneficial effects that the heart rate detection is started and the preset locking state is entered; the subsequent press event action_pointer_down is masked. The heart rate detection touch control scheme with higher stability is realized, the fault tolerance of heart rate detection is improved, and the user experience of the function is enhanced.
Example eight
Fig. 10 is a flowchart of an eighth embodiment of an on-screen heart rate detection touch method according to the present invention, based on the above embodiment, the acquiring a window management service in the heart rate detection interface, setting, by using the window management service, an attribute parameter of a heart rate detection window, including:
and S01, adding a transparent floating view in a region containing heart rate detection in the heart rate detection interface.
S02, in the floating view, a multi-finger touch event is processed through an onTouchEvent callback method, wherein when a pressing event motion_POINTER_DOWN or a pressing event motion_DOWN is received, whether the pressing event is located in a heart rate detection area or not is calculated according to coordinate values of the pressing event, if so, heart rate detection is started, and the locking state is entered.
In this embodiment, a transparent floating view, named mcacklayout, is added at the bottom of the heart rate detection interface, e.g., containing the heart rate detection area, and the view is the entire bottom area.
In this embodiment, the view processes multi-finger touch events in the ontouch callback method, and when a motion event, motion_pointer_down, motion_event, motion_down event is received, calculates whether the event is located in a heart rate detection area according to x and y coordinate values of the event, if so, starts heart rate detection, locks a state, and the subsequent motion_pointer_down is not responded any more.
In this embodiment, the heart rate detection is ended if a motion event. Action_cancel, motion event. Action_up event is received within 15 seconds of the heart rate detection.
The embodiment has the beneficial effects that a transparent floating view is added in the region containing heart rate detection in the heart rate detection interface; in the floating view, a multi-finger touch event is processed in an onTouchEvent callback method, wherein when a pressing event motion_POINTER_DOWN or a pressing event motion_POINTER_DOWN is received, whether the pressing event is located in a heart rate detection area or not is calculated according to the coordinate value of the pressing event, if so, heart rate detection is started, and the locking state is entered. The heart rate detection touch control scheme with higher stability is realized, the fault tolerance of heart rate detection is improved, and the user experience of the function is enhanced.
Example nine
Based on the above embodiment, the present invention further provides an off-screen heart rate detection touch device, which includes a memory, a processor, and a computer program stored on the memory and executable on the processor, where the computer program when executed by the processor implements the steps of the off-screen heart rate detection touch method as described in any one of the above.
It should be noted that the above device embodiments and method embodiments belong to the same concept, the specific implementation process of the device embodiments is detailed in the method embodiments, and technical features in the method embodiments are correspondingly applicable to the device embodiments, which are not repeated herein.
Examples ten
Based on the above embodiment, the present invention further provides a computer readable storage medium, on which an off-screen heart rate detection touch program is stored, where the off-screen heart rate detection touch program, when executed by a processor, implements the steps of the off-screen heart rate detection touch method according to any one of the above embodiments.
It should be noted that the medium embodiment and the method embodiment belong to the same concept, the specific implementation process of the medium embodiment and the method embodiment are detailed, and technical features in the method embodiment are correspondingly applicable in the medium embodiment, which is not repeated herein.
It should be noted that, in this document, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or apparatus. Without further limitation, an element defined by the phrase "comprising one … …" does not exclude the presence of other like elements in a process, method, article, or apparatus that comprises the element.
The foregoing embodiment numbers of the present invention are merely for the purpose of description, and do not represent the advantages or disadvantages of the embodiments.
From the above description of the embodiments, it will be clear to those skilled in the art that the above-described embodiment method may be implemented by means of software plus a necessary general hardware platform, but of course may also be implemented by means of hardware, but in many cases the former is a preferred embodiment. Based on such understanding, the technical solution of the present invention may be embodied essentially or in a part contributing to the prior art in the form of a software product stored in a storage medium (e.g. ROM/RAM, magnetic disk, optical disk) comprising instructions for causing a terminal (which may be a mobile phone, a computer, a server, an air conditioner, or a network device, etc.) to perform the method according to the embodiments of the present invention.
The embodiments of the present invention have been described above with reference to the accompanying drawings, but the present invention is not limited to the above-described embodiments, which are merely illustrative and not restrictive, and many forms may be made by those having ordinary skill in the art without departing from the spirit of the present invention and the scope of the claims, which are to be protected by the present invention.

Claims (3)

1. An off-screen heart rate detection touch method, the method comprising:
creating a transparent window view of heart rate detection in a region containing heart rate detection in the heart rate detection interface;
acquiring window management service Window manager in the heart rate detection interface, and setting attribute parameters Window manager.
Adding the named mcackview of the window view and the attribute parameters to the window management service;
processing a touch event of the heart rate detection window according to an onTouchEvent callback method through the window view, wherein when the heart rate detection window receives an initial pressing event, calculating whether the pressing event is positioned in a heart rate detection area or not according to coordinate values of the pressing event, if so, starting heart rate detection and entering a preset locking state, and shielding a subsequent pressing event;
ending heart rate detection if a motionevent. Action_cancel event or a motionevent. Action_up event is received during heart rate detection;
wherein:
determining that an event in a peripheral area of the heart rate detection window is processed by a window corresponding to the peripheral area through the attribute parameters, setting the position of the heart rate detection window as the position of a fingerprint area, and setting the size of the heart rate detection window as the size of the fingerprint area; and adding a first identifier, namely Window manager, layoutParms, FLAG_NOT_FOCUSABLE, into the attribute parameter, masking a pressing event by the first identifier, adding a second identifier, namely Window manager, layoutParms, FLAG_NOT_TOUCH_MODUAL and a third identifier, namely Window manager, namely LayoutParms, FLAG_WATCH_OUTSIDE_TOUCH, and determining that the event of the peripheral region of the heart rate window is processed by a window corresponding to the peripheral region by the second identifier and the third identifier.
2. An off-screen heart rate detection touch device, characterized in that the device comprises a memory, a processor and a computer program stored on the memory and executable on the processor, which computer program, when being executed by the processor, implements the steps of the off-screen heart rate detection touch method according to claim 1.
3. A computer readable storage medium, wherein an off-screen heart rate detection touch program is stored on the computer readable storage medium, and the off-screen heart rate detection touch program, when executed by a processor, implements the steps of the off-screen heart rate detection touch method as claimed in claim 1.
CN202111552639.7A 2021-12-17 2021-12-17 Touch method and device for off-screen heart rate detection and computer readable storage medium Active CN114285937B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202111552639.7A CN114285937B (en) 2021-12-17 2021-12-17 Touch method and device for off-screen heart rate detection and computer readable storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202111552639.7A CN114285937B (en) 2021-12-17 2021-12-17 Touch method and device for off-screen heart rate detection and computer readable storage medium

Publications (2)

Publication Number Publication Date
CN114285937A CN114285937A (en) 2022-04-05
CN114285937B true CN114285937B (en) 2024-03-19

Family

ID=80872876

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202111552639.7A Active CN114285937B (en) 2021-12-17 2021-12-17 Touch method and device for off-screen heart rate detection and computer readable storage medium

Country Status (1)

Country Link
CN (1) CN114285937B (en)

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103294398A (en) * 2013-05-08 2013-09-11 深圳Tcl新技术有限公司 Method and device for controlling display terminal based on suspension-type visual window
CN104238928A (en) * 2013-06-14 2014-12-24 阿尔卡特朗讯 Method and device for performing locking operation on screen of touch screen device
CN106445278A (en) * 2016-08-31 2017-02-22 冠捷显示科技(厦门)有限公司 Control method of transparent suspension window
CN109309752A (en) * 2018-07-19 2019-02-05 奇酷互联网络科技(深圳)有限公司 The method and device of mobile terminal and one-handed performance screen
CN109669580A (en) * 2018-12-28 2019-04-23 努比亚技术有限公司 False-touch prevention operating method, mobile terminal and computer readable storage medium

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103677578A (en) * 2013-12-16 2014-03-26 天津三星通信技术研究有限公司 Partial shielding method for screen and portable terminal with adoption of method

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103294398A (en) * 2013-05-08 2013-09-11 深圳Tcl新技术有限公司 Method and device for controlling display terminal based on suspension-type visual window
CN104238928A (en) * 2013-06-14 2014-12-24 阿尔卡特朗讯 Method and device for performing locking operation on screen of touch screen device
CN106445278A (en) * 2016-08-31 2017-02-22 冠捷显示科技(厦门)有限公司 Control method of transparent suspension window
CN109309752A (en) * 2018-07-19 2019-02-05 奇酷互联网络科技(深圳)有限公司 The method and device of mobile terminal and one-handed performance screen
CN109669580A (en) * 2018-12-28 2019-04-23 努比亚技术有限公司 False-touch prevention operating method, mobile terminal and computer readable storage medium

Also Published As

Publication number Publication date
CN114285937A (en) 2022-04-05

Similar Documents

Publication Publication Date Title
CN109663353B (en) Game operation method, mobile terminal and computer readable storage medium
CN109471571B (en) Display method of suspension control, mobile terminal and computer readable storage medium
CN109195213B (en) Mobile terminal screen control method, mobile terminal and computer readable storage medium
CN107888768B (en) Unlocking control method, terminal and computer readable storage medium
CN108958936B (en) Application program switching method, mobile terminal and computer readable storage medium
CN110275794B (en) Screen display method of terminal, and computer-readable storage medium
CN109584897B (en) Video noise reduction method, mobile terminal and computer readable storage medium
CN110020386B (en) Application page sharing method, mobile terminal and computer readable storage medium
CN110096213B (en) Terminal operation method based on gestures, mobile terminal and readable storage medium
CN109408187B (en) Head portrait setting method and device, mobile terminal and readable storage medium
CN111443818B (en) Screen brightness regulation and control method, equipment and computer readable storage medium
CN111970738B (en) Network switching control method, device and computer readable storage medium
CN110427229B (en) Application non-response processing method, mobile terminal and computer readable storage medium
CN109800097B (en) Notification message reminding method, storage medium and mobile terminal
CN109947520B (en) Webpage control processing method, device, equipment and storage medium
CN109711850B (en) Secure payment method, device and computer readable storage medium
CN109948368B (en) Privacy authority control method, device and computer readable storage medium
CN109561221B (en) Call control method, device and computer readable storage medium
CN107580106B (en) Call control method, mobile terminal and computer readable storage medium
CN107562304B (en) Control method, mobile terminal and computer readable storage medium
CN110572518B (en) Screen-extinguishing control method, mobile terminal and computer-readable storage medium
CN112015508B (en) Screen-throwing interaction control method, equipment and computer-readable storage medium
CN111476231B (en) Image area identification method, device and computer readable storage medium
CN114285937B (en) Touch method and device for off-screen heart rate detection and computer readable storage medium
CN110377458B (en) Data recovery method, mobile terminal and computer readable 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