CN109254656A - Proximity test method and apparatus - Google Patents

Proximity test method and apparatus Download PDF

Info

Publication number
CN109254656A
CN109254656A CN201810962609.5A CN201810962609A CN109254656A CN 109254656 A CN109254656 A CN 109254656A CN 201810962609 A CN201810962609 A CN 201810962609A CN 109254656 A CN109254656 A CN 109254656A
Authority
CN
China
Prior art keywords
close
event
terminal device
screen state
data
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.)
Granted
Application number
CN201810962609.5A
Other languages
Chinese (zh)
Other versions
CN109254656B (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.)
Guangdong Oppo Mobile Telecommunications Corp Ltd
Original Assignee
Guangdong Oppo Mobile Telecommunications Corp 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 Guangdong Oppo Mobile Telecommunications Corp Ltd filed Critical Guangdong Oppo Mobile Telecommunications Corp Ltd
Priority to CN201810962609.5A priority Critical patent/CN109254656B/en
Publication of CN109254656A publication Critical patent/CN109254656A/en
Application granted granted Critical
Publication of CN109254656B publication Critical patent/CN109254656B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

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/017Gesture based interaction, e.g. based on a set of recognized hand gestures

Abstract

The application proposes a kind of proximity test method and apparatus, wherein, method includes: to detect the current screen state of terminal device, if current screen state is in default screen state, target hardware element corresponding with current screen state is then determined in terminal device, wherein, the initial registration function of target hardware element is non-close to event recognition function;Target hardware element is registered as close to event detection element;It controls close to event detection element and external object is detected relative to terminal device screen close to data according to predetermined period;Judged close to data close to event according to what is reported close to event detection element.Make full use of mounted element in terminal device to provide close to event recognition function as a result, while not increasing cost, optimize terminal device close to identification function.

Description

Proximity test method and apparatus
Technical field
This application involves technical field of electronic equipment more particularly to a kind of proximity test method and apparatus.
Background technique
With the progress of terminal device manufacturing technology, knowing close to event based on proximity sensor is may be implemented in terminal device Other function, thus, it is possible to support the upper layer application of terminal device to provide based on the various function services close to data, for example, branch Game application is held to provide based on the gesture operation action recognition function close to data.
In the related technology, always by preset a certain mounting hardware sensor acquisition close to data, and in fact, when eventually When the screen state difference of end equipment, the corresponding acquisition condition close to data is different, thus, it fixed is connect only by one Nearly sensor is difficult to adapt to acquisition condition complicated and changeable close to data to acquire, cause the error close to data of acquisition compared with Greatly.And if by increase the quantity of proximity sensor is adapted to acquisition condition complicated and changeable, will increase to terminal device Aperture, the aesthetics of terminal device is destroyed while increasing cost.
Apply for content
The application is intended to solve at least some of the technical problems in related technologies.
The application first aspect embodiment proposes a kind of proximity test method based on terminal device, comprising: detection is eventually The current screen state of end equipment, if the current screen state is in default screen state, in the terminal device really Fixed target hardware element corresponding with the current screen state, wherein the initial registration function of the target hardware element is It is non-close to event recognition function;The target hardware element is registered as close to event detection element;It controls described close to event Detecting element detects external object relative to terminal device screen close to data according to predetermined period;According to described close to event What detecting element reported judges close to data close to event.
The application second aspect embodiment proposes a kind of proximity test device based on terminal device, comprising: the first inspection Module is surveyed, for detecting the current screen state of terminal device;Determining module, for being in default in the current screen state When screen state, target hardware element corresponding with the current screen state is determined in the terminal device, wherein described The initial registration function of target hardware element is non-close to event recognition function;Registration module, for the target hardware is first Part is registered as close to event detection element;Second detection module, it is described all according to presetting close to event detection element for controlling Phase detects external object relative to terminal device screen close to data;Judgment module is used for according to described close to event detection What element reported judges close to data close to event.
The application third aspect embodiment proposes a kind of terminal device, including memory, processor and is stored in storage On device and the computer program that can run on a processor, when the processor executes the computer program, realize as aforementioned Proximity test method described in first aspect embodiment based on terminal device.
The application fourth aspect embodiment proposes a kind of computer readable storage medium, is stored thereon with computer journey Sequence realizes the connecing based on terminal device as described in aforementioned first aspect embodiment when the computer program is executed by processor Nearly detection method.
Technical solution provided by the present application, include at least it is following the utility model has the advantages that
The current screen state of terminal device is detected, if current screen state is in default screen state, is set in terminal Standby middle determination target hardware element corresponding with current screen state, wherein the initial registration function of target hardware element is non- Close to event recognition function, target hardware element is registered as close to event detection element, in turn, control is first close to event detection Part detects external object relative to terminal device screen close to data according to predetermined period, and according to close to event detection element What is reported judges close to data close to event.Mounted element in terminal device is made full use of to provide close to event knowledge as a result, Other function, while not increasing cost, optimize terminal device close to identification function.
The additional aspect of the application and advantage will be set forth in part in the description, and will partially become from the following description It obtains obviously, or recognized by the practice of the application.
Detailed description of the invention
The application is above-mentioned and/or additional aspect and advantage will become from the following description of the accompanying drawings of embodiments Obviously and it is readily appreciated that, in which:
Fig. 1 is the flow chart according to the proximity test method of the application one embodiment;
Fig. 2 is the flow chart according to the proximity test method of the application another embodiment;
Fig. 3 is the floor map of the terminal device of the application certain embodiments;
Fig. 4 is a schematic cross-section of the terminal device of the application certain embodiments;
Fig. 5 is another schematic cross-section of the terminal device of the application certain embodiments;
Fig. 6 is the structural schematic diagram according to the proximity test device of the application one embodiment;
Fig. 7 is the structural schematic diagram according to the proximity test device of the application another embodiment;And
Fig. 8 is the structural schematic diagram according to the proximity test device of the application another embodiment.
Specific embodiment
Embodiments herein is described below in detail, examples of the embodiments are shown in the accompanying drawings, wherein from beginning to end Same or similar label indicates same or similar element or element with the same or similar functions.Below with reference to attached The embodiment of figure description is exemplary, it is intended to for explaining the application, and should not be understood as the limitation to the application.
For what is be previously mentioned in above-mentioned background technique, due to using that some fixes always close to sensing in terminal device Device realizes the detection close to data, causes to be difficult to adapt to changeable acquisition condition, for example, when the proximity sensor of fixed setting When for infrared sensor, in the state of screen bright screen, proximity sensor makes the electricity in screen during emitting infrared light Son is excited so as to cause the flashing of light transmission display screen, so that the normal display with light transmission display screen forms interference, influences terminal Equipment provides the function services quality of energy, and the electronics of display screen and infrared light interact, and reduce adopting close to data The accuracy of collection.
Under the premise of for contradictory between the proximity sensor and changeable acquisition condition for solving above-mentioned fixation, do not increase The aperture and cost for adding terminal device are provided this application provides a kind of using other hardware installed in terminal device Close to the method for identification function.
Below with reference to the accompanying drawings the proximity test method and apparatus of the embodiment of the present application are described, wherein the proximity test method Can be using main body there is terminal device close to identification function hardware comprising touch screen etc., which can be hand Machine, tablet computer, personal digital assistant, wearable device etc. have the hardware device of touch screen, which can be Intelligent bracelet, smartwatch, intelligent glasses etc..
Fig. 1 be according to the flow chart of the proximity test method of the application one embodiment, as shown in Figure 1, this method comprises:
Step 101, the current screen state of terminal device is detected, if current screen state is in default screen state, Target hardware element corresponding with current screen state is determined in terminal device, wherein the initial registration of target hardware element Function is non-close to event recognition function.
Wherein, screen state includes bright screen state, puts out screen state etc., and target hardware element includes that may be implemented to pass through detection The signal arrived judges hardware of the external object at a distance from the touch screen of terminal device, for example, including can be according to capacitance Change determine external object and touch screen distance touch screen (capacitance touch screen etc.), can be true according to the lamplight brightness extent of damage Determine the light radiated element etc. of external object Yu touch screen distance.It is emphasized that the target hardware in the embodiment of the present application The initial registration function of element is not non-close to event recognition function, for example, the initial registration function of touch screen is display function Deng in embodiments herein, extending the function of the target hardware element, make it not only and can be implemented the initial note of its registration Volume function, can also implement close to event detection function, thus, while not increasing hardware cost, realize detecting event The extension of function.
Certainly, as analyzing above, when screen is under different screen states, coherent detection element testing to connect The accuracy of nearly data is different, thus, in embodiments herein, in order to guarantee the detection data of target hardware element testing Accuracy, therefore, to assure that when it carries out detection data acquisition, screen state is in the state that is adapted to target hardware element, So-called adaptation, it can be understood as under current screen state, the accuracy of the detection data acquired using target hardware element is higher, Operability is stronger, and not will lead to touch screen splashette etc. influences the generation of event of user experience.
Specifically, in advance for its default screen state of target hardware element setting adaptation, then detecting that terminal sets When standby current screen state is matched with default screen state, target hardware element corresponding with current screen state is determined, than Such as, when screen is under bright screen state, since touch screen is in running order, capacitance touch screen capacitor can be got in real time Variation, and making full use of for resource may be implemented, therefore, it is possible to determine that touch screen is hard as the target under currently bright screen state Part element.
In one embodiment of the application, if the current screen state of terminal device is in non-default screen shape State then shows to detect currently without suitable target hardware element close to data, close in order to provide to terminal device at this time Pre-registered proximity sensor element is called in event detection service, wherein pre-registered proximity sensor element it is initial Registering functional is close to event recognition function, i.e., the proximity sensor is the infrared proximity sensing being installed and registered in terminal device Device etc. dedicated for realize close to event detection function hardware device.
In turn, it controls the proximity sensor element and touch of the external object relative to terminal device is detected according to predetermined period Screen close to data, for example, when the proximity sensor element be infrared proximity transducer when, then obtain infrared letter to be feedback Number, finally, being judged close to data close to event according to what proximity sensor element reported, this includes that terminal device touches close to event The shielded event of screen, external object are touched close to event, external object far from event etc..
Step 102, target hardware element is registered as close to event detection element.
Specifically, due to the initial registration function of target hardware element be it is non-close to event recognition function, thus, by target Hardware element is registered as close to event detection element, it shall be highlighted that is registered as target hardware element close to event detection Element is not meant to that by its initial registration functional coverage, initial registration function is still retained, in actual operation, can be with Target hardware element is registered as close to event detection element in hardware abstraction layer, for example, infusing touch screen in hardware abstraction layer Volume is close to event detection element, which registered target hardware element as virtual proximity sensor, Eliminate the register flow path to physical access sensor, for example, when registration be infrared proximity transducer when, then need upper layer to answer With registering corresponding infrared proximity transducer respectively, and in the application, it is thus only necessary to which upper layer application reads target hardware element Detection close to data.
Step 103, control detects external object relative to terminal device screen according to predetermined period close to event detection element Curtain close to data.
Step 104, judged close to data close to event according to what is reported close to event detection element.
Specifically, control detects external object relative to terminal device screen according to predetermined period close to event detection element Close to data, this is related with target hardware element close to data, is then close to data when target hardware element is touch screen The variable quantity of capacitor judges close to data close to event according to what is reported close to event detection element in turn.
By taking target hardware element is touch screen as an example, when the external object detected is close to touch screen, capacitor can be caused Faint variation, by detect this faint words amount of paying a New Year call calculate external object and touch screen close to event.
It is easily understood that being registered as target hardware element close to after event detection element, target hardware element is read Register detect close to data, and this close to data is uploaded into upper layer application so that provide for upper layer application will be close to event function It can service.
Specifically, in one embodiment of the application, as shown in Fig. 2, by the target hardware element of terminal device It is registered as close to after event detection element, this method further include:
Step 201, the proximity sensor registration request instruction of application program in terminal device is obtained.
It should be understood that needing to register in advance and connecing when application program needs to provide based on close to when Event Function service Nearly sensor, the i.e. instruction of transmission proximity sensor registration request.
Step 202, it is called according to the instruction of proximity sensor registration request close to event detection element.
Step 203, when getting when requesting close to judgement of application program, according to connecing close to event detection element testing Nearly data judge close to event, and will be reported to application program close to data.
Specifically, as analyzing above, due to close to event detection element being target hardware in the embodiment of the present application Element is virtual, thus, in embodiments herein, called according to the instruction of proximity sensor registration request close to event detection Element, when getting when requesting close to judgement of application program, according to judging close to data close to event detection element testing Close to event, and application program will be reported to close to data, that is to say, that be not really application program registration in physical layer Corresponding proximity sensor, it is thus only necessary to upper layer application come read target hardware element testing close to data, reduce Registration cost.
In practical implementation, pre-registered proximity sensor element and can flexibly it be cut close to event detection element It changes, in one embodiment of the application, when pre-registered proximity sensor element corresponds to touch screen, then is determining to connect Nearly event be touch screen by masked event when, in order to avoid false triggering, then control touch screen in a dormant state, and open terminal Mounted proximity sensor element in equipment, for example open mounted infrared proximity transducer etc..
In order to enable those skilled in the art is more apparent from the structure of the terminal device of the embodiment of the present application, under Face combines the structure of terminal device of the specific example to the application in some possible examples to be illustrated, and is described as follows:
Fig. 3-5 is please referred to, the application embodiment provides a kind of terminal device 100.Terminal device 100 includes touch screen 103 (target hardware elements), proximity sensor element 16, optical inductor 5 and processor 23, touch screen 103 include display layer 13, Display layer 13 includes viewing area 1311, and proximity sensor element 16 is arranged below viewing area 1311, reduces terminal as a result, and set Standby aperture, proximity sensor element 16 are used to emit infrared light and receive the infrared light being reflected by the object with detection object to end The distance of end equipment 100.
The embodiment of the present application is that mobile phone is illustrated as an example with terminal device 100.Mobile phone is by being positioned proximate to sense For device element 16 to determine the distance between mobile phone and barrier and make corresponding adjustment, erroneous operation by the user can be prevented and has Conducive to the electricity for saving mobile phone.When user answer or make a phone call and by mobile phone close to head when, proximity sensor element 16 by calculating the time generation detection information that transmitter issues infrared light and receiver receives reflected infrared light, processing Device 23 closes display layer 13 according to the detection information.When mobile phone is far from head, processor 23 is again according to proximity sensor member The detection information that part 16 is fed back reopens display layer 13.
In some embodiments, display layer 13 includes OLED display layer.
Specifically, OLED display layer has good translucency, can preferably penetrate visible light and infrared light.Therefore, OLED display layer can nor affect on the transmitting of proximity sensor element 16 and receive infrared in the case where showing content effect Light.Display layer 13 can also use Micro LED display layer, and Micro LED display layer equally has to visible light and infrared light Good light transmittance.Certainly, these display layers are only used as illustrative and embodiments herein is not limited to this.In addition, aobvious Show that layer 13 is settable on the housing 20.
Referring to Fig. 5, in some embodiments, touch display screen 103 further includes euphotic cover plate 11 and touch control layer 12.Thoroughly Light cover board 11 is arranged in touch control layer 12, and touch control layer 12 is arranged on display layer 13, and the upper surface 131 of display layer 13 is towards touch-control Layer 12, euphotic cover plate 11 and touch control layer 12 are all larger than 90% to visible light transmittance rate and infrared light transmittance.
Specifically, touch control layer 12 is mainly used for receiving user input signal and being transmitted to circuit board carrying out data processing, from And obtain the specific location that user touches touch control layer 12.It should be pointed out that the setting of touch control layer 12 can refer on display layer 13 Be that touch control layer 12 is contacted with display layer 13, for example, In-Cell On-Cell coating technique can be used, by touch control layer 12 It is bonded with display layer 13, can effectively mitigate the weight of display layer 13 and reduces the integral thickness of display layer 13.Touch-control 12 setting of layer also also refers to touch control layer 12 on display layer 13 and is arranged above display layer 13, and is spaced with display layer 13.
In addition, being arranged euphotic cover plate 11 in touch control layer 12, it can be effectively protected touch control layer 12 and its internal structure, Avoid damage of the external forces to touch control layer 12 and display layer 13.Euphotic cover plate 11 and touch control layer 12 are to visible light and infrared The light transmittance of light is all larger than 90%, not only contributes to display layer 13 and preferably shows content effect, and also helps setting and exist Proximity sensor element 16 under display layer 13 steadily emits and receives infrared light, ensure that proximity sensor element 16 just Often work.
In embodiments herein, touch control layer 12 is made of capacitor board, thus, can be in the implementation of the application Touch screen 103 is registered as into target hardware element, when screen is in bright screen state, the capacitor that is detected by touch control layer 12 Faint variable quantity is determined close to event.
To sum up, the proximity test method of the embodiment of the present application detects the current screen state of terminal device, if current screen State is in default screen state, then target hardware element corresponding with current screen state is determined in terminal device, wherein The initial registration function of target hardware element is non-close to event recognition function, and target hardware element is registered as examining close to event Element is surveyed, in turn, control detects external object relative to terminal device screen according to predetermined period close to event detection element Judge close to data close to event close to data, and according to what is reported close to event detection element.Terminal is made full use of to set as a result, Mounted element is provided close to event recognition function in standby, while not increasing cost, optimizes the close of terminal device Identification function.
In order to realize above-described embodiment, the application also proposes that a kind of proximity test device, Fig. 6 are according to one reality of the application The structural schematic diagram of the proximity test device of example is applied, as shown in fig. 6, the detection device includes first detection module 10, determines mould Block 20, registration module 30, the second detection module 40 and judgment module 50.
Wherein, first detection module 10, for detecting the current screen state of terminal device.
Determining module 20, for determining and working as in terminal device when current screen state is in default screen state The corresponding target hardware element of forth screen state, wherein the initial registration function of target hardware element is non-close to event recognition Function.
Registration module 30, for being registered as target hardware element close to event detection element.
Second detection module 40, for control close to event detection element according to predetermined period detect external object relative to Terminal device screen close to data.
Judgment module 50, for judging close to data close to event according to close to what event detection element reported.
In one embodiment of the application, as shown in fig. 7, the device further includes first on the basis of as shown in Figure 6 Calling module 60, wherein
First calling module 60, for when the current screen state is in non-default screen state, calling note in advance The proximity sensor element of volume, wherein the initial registration function of pre-registered proximity sensor element is close to event recognition Function.
In this example, it is outer according to predetermined period detection to be also used to control proximity sensor element for the second detection module 40 Boundary's object is relative to terminal device screen close to data.
Judgment module 50 is also used to basis and judges close to what event detection element reported close to data close to event.
In one embodiment of the application, as shown in figure 8, the device further includes obtaining on the basis of as shown in Figure 6 Module 70, the second calling module 80 and reporting module 90, wherein
Module 70 is obtained, for being registered as by the target hardware element of terminal device close to after event detection element, Obtain the proximity sensor registration request instruction of application program in terminal device.
Second calling module 80, for being called according to the instruction of proximity sensor registration request close to event detection element;
Reporting module 90, for when get application program close to when judgement request, according to close to event detection element Detection judges close to data close to event, and will be reported to application program close to data.
It should be noted that the aforementioned explanation to close to detection method embodiment is also applied for the close of the embodiment Detection device, details are not described herein again.
To sum up, the proximity test device of the embodiment of the present application detects the current screen state of terminal device, if current screen State is in default screen state, then target hardware element corresponding with current screen state is determined in terminal device, wherein The initial registration function of target hardware element is non-close to event recognition function, and target hardware element is registered as examining close to event Element is surveyed, in turn, control detects external object relative to terminal device screen according to predetermined period close to event detection element Judge close to data close to event close to data, and according to what is reported close to event detection element.Terminal is made full use of to set as a result, Mounted element is provided close to event recognition function in standby, while not increasing cost, optimizes the close of terminal device Identification function.
In order to realize above-described embodiment, the application also proposes a kind of terminal device, comprising: memory, processor and storage On a memory and the computer program that can run on a processor, it when the processor executes the computer program, realizes Proximity test method as described in previous embodiment.
In order to realize above-described embodiment, the application also proposes a kind of computer readable storage medium, is stored thereon with calculating Machine program realizes the proximity test method proposed such as the application previous embodiment when the program is executed by processor.
In the description of this specification, reference term " one embodiment ", " some embodiments ", " example ", " specifically show The description of example " or " some examples " etc. means specific features, structure, material or spy described in conjunction with this embodiment or example Point is contained at least one embodiment or example of the application.In the present specification, schematic expression of the above terms are not It must be directed to identical embodiment or example.Moreover, particular features, structures, materials, or characteristics described can be in office It can be combined in any suitable manner in one or more embodiment or examples.In addition, without conflicting with each other, the skill of this field Art personnel can tie the feature of different embodiments or examples described in this specification and different embodiments or examples It closes and combines.
In addition, term " first ", " second " are used for descriptive purposes only and cannot be understood as indicating or suggesting relative importance Or implicitly indicate the quantity of indicated technical characteristic.Define " first " as a result, the feature of " second " can be expressed or Implicitly include at least one this feature.In the description of the present application, the meaning of " plurality " is at least two, such as two, three It is a etc., unless otherwise specifically defined.
Any process described otherwise above or method description are construed as in flow chart or herein, and expression includes It is one or more for realizing custom logic function or process the step of executable instruction code module, segment or portion Point, and the range of the preferred embodiment of the application includes other realization, wherein can not press shown or discussed suitable Sequence, including according to related function by it is basic simultaneously in the way of or in the opposite order, to execute function, this should be by the application Embodiment person of ordinary skill in the field understood.
Expression or logic and/or step described otherwise above herein in flow charts, for example, being considered use In the order list for the executable instruction for realizing logic function, may be embodied in any computer-readable medium, for Instruction execution system, device or equipment (such as computer based system, including the system of processor or other can be held from instruction The instruction fetch of row system, device or equipment and the system executed instruction) it uses, or combine these instruction execution systems, device or set It is standby and use.For the purpose of this specification, " computer-readable medium ", which can be, any may include, stores, communicates, propagates or pass Defeated program is for instruction execution system, device or equipment or the dress used in conjunction with these instruction execution systems, device or equipment It sets.The more specific example (non-exhaustive list) of computer-readable medium include the following: there is the electricity of one or more wirings Interconnecting piece (electronic device), portable computer diskette box (magnetic device), random access memory (RAM), read-only memory (ROM), erasable edit read-only storage (EPROM or flash memory), fiber device and portable optic disk is read-only deposits Reservoir (CDROM).In addition, computer-readable medium can even is that the paper that can print described program on it or other are suitable Medium, because can then be edited, be interpreted or when necessary with it for example by carrying out optical scanner to paper or other media His suitable method is handled electronically to obtain described program, is then stored in computer storage.
It should be appreciated that each section of the application can be realized with hardware, software, firmware or their combination.Above-mentioned In embodiment, software that multiple steps or method can be executed in memory and by suitable instruction execution system with storage Or firmware is realized.Such as, if realized with hardware in another embodiment, following skill well known in the art can be used Any one of art or their combination are realized: have for data-signal is realized the logic gates of logic function from Logic circuit is dissipated, the specific integrated circuit with suitable combinational logic gate circuit, programmable gate array (PGA), scene can compile Journey gate array (FPGA) etc..
Those skilled in the art are understood that realize all or part of step that above-described embodiment method carries It suddenly is that relevant hardware can be instructed to complete by program, the program can store in a kind of computer-readable storage medium In matter, which when being executed, includes the steps that one or a combination set of embodiment of the method.
It, can also be in addition, can integrate in a processing module in each functional unit in each embodiment of the application It is that each unit physically exists alone, can also be integrated in two or more units in a module.Above-mentioned integrated mould Block both can take the form of hardware realization, can also be realized in the form of software function module.The integrated module is such as Fruit is realized and when sold or used as an independent product in the form of software function module, also can store in a computer In read/write memory medium.
Storage medium mentioned above can be read-only memory, disk or CD etc..Although having been shown and retouching above Embodiments herein is stated, it is to be understood that above-described embodiment is exemplary, and should not be understood as the limit to the application System, those skilled in the art can be changed above-described embodiment, modify, replace and become within the scope of application Type.

Claims (10)

1. a kind of proximity test method characterized by comprising
The current screen state of terminal device is detected, if the current screen state is in default screen state, at the end Corresponding with current screen state target hardware element is determined in end equipment, wherein the target hardware element it is initial Registering functional is non-close to event recognition function;
The target hardware element is registered as close to event detection element;
It controls and described external object is detected relative to the close of terminal device screen according to predetermined period close to event detection element Data;
Judged close to what event detection element reported close to data close to event according to described.
2. the method as described in claim 1, which is characterized in that after the current screen state of the detection terminal device, Further include:
When the current screen state is in non-default screen state, pre-registered proximity sensor element is called, wherein The initial registration function of the pre-registered proximity sensor element is close to event recognition function;
It controls the proximity sensor element and external object is detected relative to the close of terminal device touch screen according to predetermined period Data;
Judged close to data close to event according to what the proximity sensor element reported.
3. the method as described in claim 1, which is characterized in that registered in the target hardware element by the terminal device After approaching event detection element, further includes:
Obtain the proximity sensor registration request instruction of application program in the terminal device;
It is called according to proximity sensor registration request instruction described close to event detection element;
When get the application program close to when judgement request, according to described close to event detection element testing close to number It is judged that being reported to the application program close to data close to event, and by described.
4. the method as described in claim 1, which is characterized in that the target hardware element includes the touch of the terminal device Screen, then the target hardware element by terminal device is registered as close to event detection element, comprising:
The touch screen is registered as in hardware abstraction layer close to event detection element.
5. method as claimed in claim 4, which is characterized in that further include:
When it is described close to event be the touch screen by masked event when, control the touch screen in a dormant state, and open Mounted proximity sensor element in the terminal device.
6. a kind of proximity test device characterized by comprising
First detection module, for detecting the current screen state of terminal device;
Determining module, for when the current screen state is in default screen state, determined in the terminal device with The corresponding target hardware element of the current screen state, wherein the initial registration function of the target hardware element is non-connects Nearly event recognition function;
Registration module, for being registered as the target hardware element close to event detection element;
Second detection module, for control it is described close to event detection element according to predetermined period detect external object relative to end End equipment screen close to data;
Judgment module, for being judged close to what event detection element reported close to data close to event according to described.
7. device as claimed in claim 6, which is characterized in that further include:
First calling module, for calling pre-registered connect when the current screen state is in non-default screen state Nearly sensor element, wherein the initial registration function of the pre-registered proximity sensor element is close to event recognition function Energy;
It is opposite according to predetermined period detection external object to be also used to control the proximity sensor element for second detection module In terminal device screen close to data;
The judgment module is also used to be judged close to data close to event according to described close to what event detection element reported.
8. device as claimed in claim 6, which is characterized in that further include:
Obtain module, for it is described by the target hardware element of the terminal device be registered as close to event detection element it Afterwards, the proximity sensor registration request instruction of application program in the terminal device is obtained;Second calling module, for according to institute It is described close to event detection element to state proximity sensor registration request instruction calling;
Reporting module, for when get the application program close to judgement request when, according to it is described close to event detection member Part detection judges close to data close to event, and is reported to the application program close to data for described.
9. a kind of terminal device characterized by comprising memory, processor and storage are on a memory and can be in processor The computer program of upper operation when the processor executes the computer program, is realized as described in any in claim 1-5 Proximity test method.
10. a kind of computer readable storage medium, is stored thereon with computer program, which is characterized in that the program is by processor Such as proximity test method as claimed in any one of claims 1 to 5 is realized when execution.
CN201810962609.5A 2018-08-22 2018-08-22 Proximity detection method and device Active CN109254656B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201810962609.5A CN109254656B (en) 2018-08-22 2018-08-22 Proximity detection method and device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201810962609.5A CN109254656B (en) 2018-08-22 2018-08-22 Proximity detection method and device

Publications (2)

Publication Number Publication Date
CN109254656A true CN109254656A (en) 2019-01-22
CN109254656B CN109254656B (en) 2021-03-23

Family

ID=65049432

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201810962609.5A Active CN109254656B (en) 2018-08-22 2018-08-22 Proximity detection method and device

Country Status (1)

Country Link
CN (1) CN109254656B (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110321879A (en) * 2019-08-20 2019-10-11 成都数据天空科技有限公司 It is a kind of close to judgment method, device, equipment and storage medium

Citations (11)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20090197615A1 (en) * 2008-02-01 2009-08-06 Kim Joo Min User interface for mobile devices
US20090225043A1 (en) * 2008-03-05 2009-09-10 Plantronics, Inc. Touch Feedback With Hover
CN102855037A (en) * 2012-08-07 2013-01-02 深圳天珑无线科技有限公司 Capacitive screen mobile terminal and screen control method and device thereof
JP2014003350A (en) * 2012-06-15 2014-01-09 Kyocera Corp Portable terminal device and control method of the same
CN104007878A (en) * 2014-05-16 2014-08-27 广东欧珀移动通信有限公司 Method and device for preventing error operation on touch screen terminal
CN104836922A (en) * 2015-05-29 2015-08-12 歌尔声学股份有限公司 Method and component for detecting approach/departure of external object
CN105302347A (en) * 2014-07-14 2016-02-03 宇龙计算机通信科技(深圳)有限公司 Method and apparatus for simulating distance sensor by using touch screen
CN105791515A (en) * 2014-12-22 2016-07-20 青岛海信移动通信技术股份有限公司 Screen state control method for terminal equipment and terminal equipment
CN105812507A (en) * 2014-12-19 2016-07-27 宏达国际电子股份有限公司 Portable electronic device and control method thereof
CN106060274A (en) * 2016-07-14 2016-10-26 广东欧珀移动通信有限公司 Method and device for reporting ambient light sensor data and mobile terminal
CN107343069A (en) * 2017-06-26 2017-11-10 北京小米移动软件有限公司 Terminal and acoustic signals transmission method

Patent Citations (11)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20090197615A1 (en) * 2008-02-01 2009-08-06 Kim Joo Min User interface for mobile devices
US20090225043A1 (en) * 2008-03-05 2009-09-10 Plantronics, Inc. Touch Feedback With Hover
JP2014003350A (en) * 2012-06-15 2014-01-09 Kyocera Corp Portable terminal device and control method of the same
CN102855037A (en) * 2012-08-07 2013-01-02 深圳天珑无线科技有限公司 Capacitive screen mobile terminal and screen control method and device thereof
CN104007878A (en) * 2014-05-16 2014-08-27 广东欧珀移动通信有限公司 Method and device for preventing error operation on touch screen terminal
CN105302347A (en) * 2014-07-14 2016-02-03 宇龙计算机通信科技(深圳)有限公司 Method and apparatus for simulating distance sensor by using touch screen
CN105812507A (en) * 2014-12-19 2016-07-27 宏达国际电子股份有限公司 Portable electronic device and control method thereof
CN105791515A (en) * 2014-12-22 2016-07-20 青岛海信移动通信技术股份有限公司 Screen state control method for terminal equipment and terminal equipment
CN104836922A (en) * 2015-05-29 2015-08-12 歌尔声学股份有限公司 Method and component for detecting approach/departure of external object
CN106060274A (en) * 2016-07-14 2016-10-26 广东欧珀移动通信有限公司 Method and device for reporting ambient light sensor data and mobile terminal
CN107343069A (en) * 2017-06-26 2017-11-10 北京小米移动软件有限公司 Terminal and acoustic signals transmission method

Non-Patent Citations (2)

* Cited by examiner, † Cited by third party
Title
R.JIN ET AL.: "MagPairing: Pairing Smartphones in Close Proximity Using Magnetometers", 《IEEE TRANSACTIONS ON INFORMATION FORENSICS AND SECURITY》 *
刘可昌 等: "基于电荷转移技术的触摸键原理及应用", 《仪表技术》 *

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110321879A (en) * 2019-08-20 2019-10-11 成都数据天空科技有限公司 It is a kind of close to judgment method, device, equipment and storage medium

Also Published As

Publication number Publication date
CN109254656B (en) 2021-03-23

Similar Documents

Publication Publication Date Title
KR102446849B1 (en) Electronic device and method for identifying falsification of biometric information
CN107332948A (en) Display device, terminal device and proximity state detection method
US10528174B2 (en) Electronic device including a plurality of input devices and control method thereof
CN108021860B (en) Device for reducing noise input of fingerprint sensor
CN109564628A (en) Fingerprint identification method, device and the terminal device with fingerprint identification function
CN209072544U (en) Fingerprint identification device and terminal device with fingerprint identification function
CN106443639A (en) Distance calibration method and terminal
US10490057B1 (en) Hygienic sensor device, system, and method for monitoring hygienic dispenser usage and compliance
KR20180001055A (en) Electronic device including the fingerprint sensor and operating method thereof
CN107463329A (en) Detection method, device, storage medium and the mobile terminal of blank screen gesture
CN110249613A (en) Display screen condition control method, device, storage medium and electronic equipment
CN109271019A (en) Close to event detection element method for handover control and device
KR20170096565A (en) Electronic apparatus
CN109144224A (en) The power consumption optimization method and device of touch screen
KR102609476B1 (en) Method and electronic device for obtaining touch input
CN109361815A (en) Light on and off screen control method, device and the electronic equipment of electronic equipment
KR102406072B1 (en) Electronic apparatus and method for controlling operations the electronic apparatus based on pressure inputs
CN108881645A (en) The screen control method and device of mobile phone communication
CN206948392U (en) display device and terminal device
CN107390907A (en) Touch module, electronic equipment and pressure calibration method
CN105874401A (en) Keyboard proximity sensing
CN109194833A (en) The screen control method and device of mobile phone communication
KR101719975B1 (en) Touchscreen device for finger print recognition
KR20190003085A (en) Electronic device for providing service and operating mehtod thereof
CN109040362A (en) The assemble method of electronic device and electronic device

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