CN106775308B - proximity sensor switching method and device and terminal - Google Patents

proximity sensor switching method and device and terminal Download PDF

Info

Publication number
CN106775308B
CN106775308B CN201611107921.3A CN201611107921A CN106775308B CN 106775308 B CN106775308 B CN 106775308B CN 201611107921 A CN201611107921 A CN 201611107921A CN 106775308 B CN106775308 B CN 106775308B
Authority
CN
China
Prior art keywords
terminal
proximity sensor
holding mode
side frame
acquiring
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
CN201611107921.3A
Other languages
Chinese (zh)
Other versions
CN106775308A (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 CN201611107921.3A priority Critical patent/CN106775308B/en
Publication of CN106775308A publication Critical patent/CN106775308A/en
Application granted granted Critical
Publication of CN106775308B publication Critical patent/CN106775308B/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/048Interaction techniques based on graphical user interfaces [GUI]
    • G06F3/0484Interaction techniques based on graphical user interfaces [GUI] for the control of specific functions or operations, e.g. selecting or manipulating an object, an image or a displayed text element, setting a parameter value or selecting a range
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F3/00Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
    • G06F3/01Input arrangements or combined input and output arrangements for interaction between user and computer
    • G06F3/048Interaction techniques based on graphical user interfaces [GUI]
    • G06F3/0487Interaction techniques based on graphical user interfaces [GUI] using specific features provided by the input device, e.g. functions controlled by the rotation of a mouse with dual sensing arrangements, or of the nature of the input device, e.g. tap gestures based on pressure sensed by a digitiser

Landscapes

  • Engineering & Computer Science (AREA)
  • General Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Human Computer Interaction (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Telephone Function (AREA)

Abstract

The embodiment of the invention discloses a proximity sensor switching method, a proximity sensor switching device and a terminal; the proximity sensor switching method comprises the steps of acquiring a holding mode of a terminal and a proximity sensor identifier corresponding to a currently started proximity sensor when the terminal is in a call state; acquiring a target proximity sensor identifier corresponding to the holding mode; and when the proximity sensor identification is judged not to be matched with the target proximity sensor identification, switching the currently started proximity sensor to the target proximity sensor corresponding to the target proximity sensor identification. According to the embodiment of the invention, the corresponding proximity sensor can be selected according to the holding mode of the terminal, so that the detection accuracy of the proximity sensor is improved.

Description

Proximity sensor switching method and device and terminal
Technical Field
the invention relates to the technical field of terminals, in particular to a proximity sensor switching method, a proximity sensor switching device and a terminal.
Background
With the rapid development of terminal technology, intelligent terminals are more and more popular and become essential devices in people's life. People can learn, entertain and the like through the intelligent terminal.
the distance between the terminal and the obstacle is generally detected in the smart terminal by a proximity sensor, and is implemented by using an infrared transmitter and an infrared receiver. This infrared emitter sends infrared light, forms reflection light after the obstacle reflection, and this infrared receiver receives this reflection light after, judges whether this intelligent terminal is close or keeps away from the obstacle according to reflection light's light intensity value.
In order to improve the detection accuracy, two proximity sensors are respectively arranged on two sides of the receiver, wherein one proximity sensor can emit infrared light and receive returned infrared light, and the other proximity sensor only receives the returned infrared light. However, if the user holds the intelligent terminal with the right hand for conversation, at this time, after the transmitter of the first proximity sensor of the receiver transmits infrared rays, the infrared rays are reflected back after being blocked by the face of the person and are received by the receiver of the first proximity sensor, so that the situation that the intelligent terminal is close to the face of the person is judged. However, if the user holds the smart terminal with the left hand instead, the transmitter of the first proximity sensor transmits infrared rays and is not blocked by the face of the user, and the terminal receives data of the terminal far away from the face of the user, so that misjudgment is caused.
disclosure of Invention
The embodiment of the invention provides a proximity sensor switching method, a proximity sensor switching device and a terminal, which can improve the detection accuracy of a proximity sensor.
the embodiment of the invention provides a proximity sensor switching method, which comprises the following steps:
when a terminal is in a call state, acquiring a holding mode of the terminal and a proximity sensor identifier corresponding to a currently started proximity sensor;
acquiring a target proximity sensor identifier corresponding to the holding mode;
And when the proximity sensor identification is judged not to be matched with the target proximity sensor identification, switching the currently started proximity sensor to a target proximity sensor corresponding to the target proximity sensor identification.
An embodiment of the present invention further provides a proximity sensor switching device, including:
The terminal comprises a first acquisition module, a second acquisition module and a control module, wherein the first acquisition module is used for acquiring a holding mode of the terminal and a proximity sensor identifier corresponding to a currently started proximity sensor when the terminal is in a call state;
The second acquisition module is used for acquiring the target proximity sensor identifier corresponding to the holding mode;
and the switching module is used for switching the currently started proximity sensor to a target proximity sensor corresponding to the target proximity sensor identification when the proximity sensor identification is judged not to be matched with the target proximity sensor identification.
An embodiment of the present invention further provides a terminal, including:
A memory storing executable program code;
A processor coupled with the memory;
the processor calls the executable program code stored in the memory to perform some or all of the steps described in any of the methods of embodiments of the invention.
The embodiment of the invention discloses a proximity sensor switching method, a proximity sensor switching device and a terminal; the proximity sensor switching method comprises the steps of acquiring a holding mode of a terminal and a proximity sensor identifier corresponding to a currently started proximity sensor when the terminal is in a call state; acquiring a target proximity sensor identifier corresponding to the holding mode; and when the proximity sensor identification is judged not to be matched with the target proximity sensor identification, switching the currently started proximity sensor to the target proximity sensor corresponding to the target proximity sensor identification. According to the embodiment of the invention, the corresponding proximity sensor can be selected according to the holding mode of the terminal, so that the detection accuracy of the proximity sensor is improved.
Drawings
In order to more clearly illustrate the technical solutions in the embodiments of the present invention, the drawings needed to be used in the description of the embodiments will be briefly introduced below, and it is obvious that the drawings in the following description are only some embodiments of the present invention, and it is obvious for those skilled in the art to obtain other drawings based on these drawings without creative efforts.
Fig. 1 is a flow chart of a proximity sensor switching method according to a preferred embodiment of the present invention.
Fig. 2 is a schematic structural diagram of a terminal according to a preferred embodiment of the present invention.
Fig. 3 is a schematic view of the operation principle of the proximity sensor according to the preferred embodiment of the present invention.
Fig. 4 is a schematic diagram of the operation of a first proximity sensor in accordance with a preferred embodiment of the present invention.
Fig. 5 is a schematic diagram of the operation of a second proximity sensor in accordance with a preferred embodiment of the present invention.
fig. 6 is another flow chart of a proximity sensor switching method according to a preferred embodiment of the present invention.
Fig. 7 is a schematic diagram of the left-hand holding mode of the terminal according to the preferred embodiment of the invention.
fig. 8 is a schematic diagram of a right-hand grip mode of the terminal according to the preferred embodiment of the invention.
Fig. 9 is another schematic structural diagram of the terminal according to the preferred embodiment of the present invention.
Fig. 10 is a schematic structural view of a proximity sensor switching device according to a preferred embodiment of the present invention.
Detailed Description
The technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the drawings in the embodiments of the present invention, and it is obvious that the described embodiments are only a part of the embodiments of the present invention, and not all of the embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.
The terms "first", "second", "third" and "fourth", etc. in the present invention are used for distinguishing different objects, not for describing a particular order. Furthermore, the terms "include" and "have," as well as any variations thereof, are intended to cover non-exclusive inclusions. For example, a process, method, system, article, or apparatus that comprises a list of steps or modules is not limited to the listed steps or modules but may alternatively include other steps or modules not listed or inherent to such process, method, article, or apparatus.
Reference herein to "an embodiment" means that a particular feature, structure, or characteristic described in connection with the embodiment can be included in at least one embodiment of the invention. The appearances of the phrase in various places in the specification are not necessarily all referring to the same embodiment, nor are separate or alternative embodiments mutually exclusive of other embodiments. It is explicitly and implicitly understood by one skilled in the art that the embodiments described herein can be combined with other embodiments.
The execution main body of the proximity sensor switching method provided by the embodiment of the invention can be the proximity sensor switching device provided by the embodiment of the invention, or a terminal integrated with the proximity sensor switching device, and the proximity sensor switching device can be realized in a hardware or software mode; the terminal described in the embodiment of the present invention may be a smart Phone (such as an Android Phone, a Windows Phone, etc.), a tablet computer, a palmtop computer, a notebook computer, a Mobile Internet device (MID, Mobile Internet Devices), or a wearable device, and the terminal is merely an example, but not an exhaustive list, and includes but is not limited to the terminal.
The embodiment of the invention provides a proximity sensor switching method, a proximity sensor switching device and a terminal. The details will be described below separately.
In a preferred embodiment, the description will be made from the perspective of a proximity sensor switching device, which may be specifically integrated in a terminal in the form of software or hardware, where the terminal may be a smart phone, a tablet computer, or the like.
referring to fig. 1, fig. 1 is a flowchart illustrating a first proximity sensor switching method according to the preferred embodiment. The respective steps of the proximity sensor switching method of the present preferred embodiment will be described in detail below.
and step S101, when the terminal is in a call state, acquiring a holding mode of the terminal and a proximity sensor identifier corresponding to a currently started proximity sensor.
When the terminal is in a call state, whether the terminal is close to a human face or not can be detected through a built-in proximity sensor in the terminal, and the terminal screen light is turned off when the terminal is close to the human face so as to save the electric quantity of the terminal. As shown in fig. 2, a proximity sensor is built in each of both sides of the terminal receiver 100, wherein a first proximity sensor 200 is hidden under a B region and a second proximity sensor 300 is hidden under an a region.
In the actual distance detection process, the emitter of the proximity sensor at one side emits detection light, a near light signal and a far light signal are formed after the detection light is emitted by the obstacle, the receiver of the proximity sensor at the same side receives the near light signal, and the receiver of the proximity sensor at the other side receives the far light signal to detect the distance between the terminal and the obstacle. As shown in fig. 3, the emitter 201 of the first proximity sensor 200 emits a detection light, the receiver 202 of the first proximity sensor 200 receives a low beam signal reflected back through the obstacle 30, and the receiver 302 of the second proximity sensor 300 receives a high beam signal reflected back through the obstacle 30. In some embodiments, the transmitter may also emit a probe sound wave. In other embodiments, the transmitter may also emit other types of detection signals, such as laser light.
wherein the holding modes include a left-hand holding mode and a right-hand holding mode. The left-hand holding mode is that the user holds the terminal with the left hand when talking. As shown in fig. 2, the terminal receiver 100 is placed on the ear, and the right part of the terminal receiver, i.e. the area a, will be close to the face. In the right-hand holding mode, when the user is talking, the user holds the terminal with the right hand, and the left part of the receiver 100 of the terminal, namely the area B, is close to the face of the user.
When the terminal is in a left-hand holding mode, the right part of the telephone receiver is tightly attached to the face, and the left part of the telephone receiver keeps a distance from the face. It is therefore assumed that the transmitter of the first proximity sensor emits a detection light, the receiver of the first proximity sensor receives a low beam signal and the receiver of the second proximity sensor receives a high beam signal. When the terminal is in the right-hand holding mode, the approach data of the terminal close to the face is detected, and when the terminal is in the left-hand holding mode, the departure data of the terminal far from the face is detected by mistake.
Therefore, when the terminal is in a left-hand holding mode, the second proximity sensor is started to detect the distance between the terminal and the face, and when the terminal is in a right-hand holding mode, the first proximity sensor is started to detect the distance between the terminal and the face, so that the detection accuracy of the proximity sensors is improved. Therefore, the holding mode of the terminal and the proximity sensor identifier corresponding to the currently turned on proximity sensor are obtained first, wherein the proximity sensor identifier indicates the currently turned on proximity sensor. In some embodiments, the holding mode of the terminal may be obtained through capacitance information of a terminal frame, and in some embodiments, the holding mode of the terminal may be obtained through pressure information of the terminal frame.
and step S102, acquiring a target proximity sensor identifier corresponding to the holding mode.
and then acquiring a target proximity sensor identifier corresponding to the holding mode, acquiring a right sensor identifier if the target proximity sensor identifier is in a left holding mode, and acquiring a left sensor identifier if the target proximity sensor identifier is in a right holding mode.
And step S103, when the proximity sensor identification is judged not to be matched with the target proximity sensor identification, switching the currently started proximity sensor to a target proximity sensor corresponding to the target proximity sensor identification.
next, it is determined whether the proximity sensor identifier matches the target proximity sensor identifier, and if not, it indicates that the proximity sensor may be misjudged, so that the target proximity sensor corresponding to the target proximity sensor identifier is switched to. If the target proximity sensor identifies that the corresponding target proximity sensor is the first proximity sensor, turning off the transmitter and the receiver of the second proximity sensor and turning on the transmitter and the receiver of the first proximity sensor, as shown in fig. 4; similarly, if the target proximity sensor identifies that the corresponding target proximity sensor is the second proximity sensor, the transmitter and receiver of the first proximity sensor are turned off, and the transmitter and receiver of the second proximity sensor are turned on, as shown in fig. 5.
If so, the distance between the terminal and the obstacle continues to be detected by the currently opened proximity sensor. When the approaching data is detected, the screen brightness of the terminal is turned off; and when the far data is detected, starting the screen brightness of the terminal.
according to the proximity sensor switching method, the corresponding proximity sensor is selected to be started according to the holding mode of the terminal, so that the detection accuracy of the proximity sensor is improved.
In a preferred embodiment, the proximity sensor switching method of the present invention will be further described.
The preferred embodiment will be described from the perspective of a proximity sensor switching device, which may be specifically integrated in a terminal in the form of software or hardware, where the terminal may be a smart phone, a tablet computer, or other devices.
Referring to fig. 6, fig. 6 is a flowchart illustrating a second proximity sensor switching method according to the preferred embodiment. The respective steps of the proximity sensor switching method of the present preferred embodiment will be described in detail below.
In step S201, a holding pattern is acquired.
And acquiring terminal holding modes in advance, wherein the holding modes comprise a left-hand holding mode and a right-hand holding mode. The left-hand holding mode is that the user holds the terminal with the left hand when talking. As shown in fig. 2, the terminal receiver 100 is placed on the ear, and the right part of the terminal receiver, i.e. the area a, will be close to the face. In the right-hand holding mode, when the user is talking, the user holds the terminal with the right hand, and the left part of the receiver 100 of the terminal, namely the area B, is close to the face of the user.
Step S202, a proximity sensor identifier corresponding to the holding mode is acquired.
a proximity sensor is respectively arranged at two sides of the telephone receiver, as shown in fig. 2, a first proximity sensor 200 is hidden under the area B, and a second proximity sensor 300 is hidden under the area a, wherein, as shown in fig. 3, the first proximity sensor 200 comprises a transmitter 201 and a receiver 202, and the second proximity sensor 300 comprises a transmitter 301 and a receiver 302.
In the actual distance detection process, the emitter of the proximity sensor at one side emits detection light, a near light signal and a far light signal are formed after the detection light is emitted by the obstacle, the receiver of the proximity sensor at the same side receives the near light signal, and the receiver of the proximity sensor at the other side receives the far light signal to detect the distance between the terminal and the obstacle. As shown in fig. 3, the emitter 201 of the first proximity sensor 200 emits a detection light, the receiver 202 of the first proximity sensor 200 receives a low beam signal reflected back through the obstacle 30, and the receiver 302 of the second proximity sensor 300 receives a high beam signal reflected back through the obstacle 30. In some embodiments, the transmitter may also emit a probe sound wave. In other embodiments, the transmitter may also emit other types of detection signals, such as laser light.
In the preferred embodiment, when the terminal is in a call state, whether the terminal is close to a human face or not can be detected through the proximity sensor, and the electric quantity of the terminal is saved by closing the screen light of the terminal when the terminal is close to the human face. When the terminal is in a left-hand holding mode, the right part of the telephone receiver is tightly attached to the face, and the left part of the telephone receiver keeps a distance from the face. It is therefore assumed that the transmitter of the first proximity sensor emits a detection light, the receiver of the first proximity sensor receives a low beam signal and the receiver of the second proximity sensor receives a high beam signal. When the terminal is in the right-hand holding mode, the approach data of the terminal close to the face is detected, and when the terminal is in the left-hand holding mode, the departure data of the terminal far from the face is detected by mistake.
through the analysis, when the terminal is in the left-hand holding mode, the second proximity sensor should be started to perform distance detection, and when the terminal is in the right-hand holding mode, the first proximity sensor should be started to perform distance detection. Thus, when the left-hand grip mode is acquired, acquiring a second proximity sensor identification, wherein the second proximity sensor identification indicates a second proximity sensor; when the right-hand grip pattern is acquired, a first proximity sensor identification is acquired, wherein the first proximity sensor identification indicates a first proximity sensor.
Step S203, establishing association between the holding mode and the proximity sensor identification and storing the association.
As can be seen from the analysis in step S203, the left-hand holding pattern corresponds to the second proximity sensor identifier, and the right-hand holding pattern corresponds to the first proximity sensor identifier. Therefore, the left-hand holding mode and the second proximity sensor, and the right-hand holding mode and the first proximity sensor can be associated and stored. In some embodiments, this may be stored by building a list of associations. In some embodiments, a database may be established for storage.
In summary, steps S201 to S203 are preset procedures for establishing an association relationship between the holding mode and the proximity sensor identifier. The process of selecting the proximity sensor according to the grip mode will be described in detail next.
and step S204, acquiring the capacitance information of the terminal frame.
when the terminal is in the left-hand holding mode, the user holds the terminal in a posture generally as shown in fig. 7, with the thumb of the left hand placed on the left side frame of the terminal and the fingers placed on the right side frame of the terminal. Accordingly, when the terminal is in the right-hand grip mode, the user's posture for holding the terminal is generally as shown in fig. 8.
according to the above analysis, the grip sensor 800 may be provided on the terminal, the capacitive sensor 900 may be provided in the bezel area of the terminal, and the capacitive sensor 900 may be connected to the input pin of the grip sensor 800, as shown in fig. 9. The capacitive sensor 900 may be used as one plate of a capacitor, and when a human body approaches the capacitive sensor, the human body is equivalent to the other plate of the capacitor. When other conditions are fixed, the larger the opposite area between the two polar plates is, the larger the capacitance value is. Consequently when the terminal was in the left hand mode of holding, the left thumb has been placed to terminal left side frame, and a plurality of fingers have been placed to terminal right side frame, and consequently the left side frame capacitance value that detects is less than right side frame capacitance value. Similarly, when the terminal is in the right-hand holding mode, the capacitance of the right-side frame of the terminal is smaller than the capacitance of the left-side frame. The holding mode of the terminal can be obtained by detecting the capacitance value. In some embodiments, 2 capacitive sensors are disposed on the two side frames of the terminal to detect capacitance information, wherein the capacitance information includes capacitance values.
Step S205, obtaining a holding mode of the terminal according to the capacitance information of the terminal frame, and obtaining a proximity sensor identifier corresponding to the currently turned on proximity sensor.
According to the analysis in the step S204, when the capacitance information of the terminal frame indicates that the capacitance value of the left side frame is smaller than the capacitance value of the right side frame, a left-hand holding mode is obtained; and when the capacitance information of the terminal frame indicates that the capacitance value of the right side frame is smaller than that of the left side frame, acquiring a right hand holding mode.
And after the holding mode of the terminal is obtained, the identification of the proximity sensor corresponding to the currently started proximity sensor is also obtained. For example, if the currently activated proximity sensor is the first proximity sensor, the first proximity sensor identification is obtained.
In some embodiments, the holding mode of the terminal may also be obtained according to the compression information of the terminal frame by obtaining the compression information of the terminal frame. The pressure information of the terminal frame comprises a pressure value of the terminal left side frame and a pressure value of the terminal right side frame.
As shown in fig. 7 and 8, when the terminal is in the left-hand holding mode, the left frame of the terminal can detect one pressure value, and the right frame can detect a plurality of pressure values; similarly, when the terminal is in the right-hand grip mode, the right-side frame of the terminal may detect one pressure value, and the left-side frame may detect a plurality of pressure values. Therefore, the number of the pressure values of the left side frame of the terminal can be compared with the number of the pressure values of the right side frame of the terminal, and a comparison result is obtained. When the comparison result shows that the number of the pressure values of the left side frame is larger than that of the pressure values of the right side frame, acquiring a right hand holding mode; and when the comparison result is that the number of the pressure values of the left side frame is smaller than that of the pressure values of the right side frame, acquiring a left hand holding mode.
And step S206, acquiring the target proximity sensor identifier corresponding to the holding mode.
Then, a target proximity sensor identifier corresponding to the holding mode is obtained, and according to the preset process in steps S201 to S203, if the target proximity sensor identifier is in the left-hand holding mode, the right-side sensor identifier is obtained, and if the target proximity sensor identifier is in the right-hand holding mode, the left-side sensor identifier is obtained.
and step S207, when the proximity sensor identification is judged not to be matched with the target proximity sensor identification, switching the currently started proximity sensor to a target proximity sensor corresponding to the target proximity sensor identification.
next, it is determined whether the proximity sensor identifier matches the target proximity sensor identifier, and if not, it indicates that the proximity sensor may be misjudged, so that the target proximity sensor corresponding to the target proximity sensor identifier is switched to. If the target proximity sensor identifies that the corresponding target proximity sensor is the first proximity sensor, turning off the transmitter and the receiver of the second proximity sensor and turning on the transmitter and the receiver of the first proximity sensor, as shown in fig. 4; similarly, if the target proximity sensor identifies that the corresponding target proximity sensor is the second proximity sensor, the transmitter and receiver of the first proximity sensor are turned off, and the transmitter and receiver of the second proximity sensor are turned on, as shown in fig. 5.
if so, the distance between the terminal and the obstacle continues to be detected by the currently opened proximity sensor. When the approaching data is detected, the screen brightness of the terminal is turned off; and when the far data is detected, starting the screen brightness of the terminal.
According to the proximity sensor switching method, the corresponding proximity sensor is selected to be started according to the holding mode of the terminal, so that the detection accuracy of the proximity sensor is improved.
in order to better implement the above method, in a preferred embodiment, a proximity sensor switching device is provided, which may be integrated in a terminal, specifically, a smart phone, a tablet computer, or the like. As shown in fig. 10, the information protection apparatus 10 includes a first obtaining module 11, a second obtaining module 12, and a switching module 13, which are described in detail as follows:
The first obtaining module 11 is configured to obtain a holding mode of the terminal and a proximity sensor identifier corresponding to a currently-started proximity sensor when the terminal is in a call state; the second obtaining module 12 is configured to obtain a target proximity sensor identifier corresponding to the holding mode; and the switching module 13 is configured to switch the currently turned-on proximity sensor to a target proximity sensor corresponding to the target proximity sensor identifier when it is determined that the proximity sensor identifier is not matched with the target proximity sensor identifier.
In some embodiments, the first obtaining module 11 includes a first obtaining submodule 111 and a second obtaining submodule 112, which are described in detail as follows:
The first obtaining submodule 111 is used for obtaining capacitance information of a terminal frame; and a second obtaining submodule 112, configured to obtain a holding mode of the terminal according to the capacitance information of the terminal frame.
in some embodiments, a grip sensor 800 may be provided on the terminal, a capacitive sensor 900 may be provided in the bezel area of the terminal, and the capacitive sensor 900 may be connected to the input pins of the grip sensor 800, as shown in fig. 9. The capacitive sensor 900 may be used as one plate of a capacitor, and when a human body approaches the capacitive sensor, the human body is equivalent to the other plate of the capacitor. When other conditions are fixed, the larger the opposite area between the two polar plates is, the larger the capacitance value is. Therefore, the capacitance information of the frames at the two sides of the terminal can be acquired through the first acquisition submodule 111.
When the terminal is in the left-hand holding mode, the left thumb has been placed to terminal left side frame, and a plurality of fingers have been placed to terminal right side frame, and the just right area between the left side bipolar plate is less than the just right area between the right side bipolar plate this moment, therefore the left side frame capacitance value that first acquireing submodule 111 acquireed is less than right side frame capacitance value. Similarly, when the terminal is in the right-hand holding mode, the capacitance value of the right-side frame of the terminal, which is acquired by the first acquiring sub-module 111, is smaller than the capacitance value of the left-side frame.
In some embodiments, when the capacitance information acquired by the first acquiring sub-module 111 is that the left bezel capacitance value is smaller than the right bezel capacitance value, the second acquiring sub-module 112 acquires the left-hand holding mode; when the capacitance information acquired by the first acquiring sub-module 111 indicates that the capacitance value of the right side frame is smaller than the capacitance value of the left side frame, the second acquiring sub-module 112 acquires the right hand holding mode.
In some embodiments, the first obtaining sub-module 111 is further configured to obtain compression information of the terminal frame; the second obtaining sub-module 112 is further configured to obtain a holding mode of the terminal according to the pressure-bearing information of the terminal frame.
The switching module 13 includes a closing submodule 131 and an opening submodule 132, which are described in detail as follows:
A shutdown submodule 131 for shutting down the transmitters and receivers of the currently turned on proximity sensors; a turn-on sub-module 132 for turning on the transmitter and receiver of the target proximity sensor.
In some embodiments, if the target proximity sensor identifies the corresponding target proximity sensor as the first proximity sensor, then the turn-off submodule 131 is invoked to turn off the transmitter and receiver of the second proximity sensor, and the turn-on submodule 132 is invoked to turn on the transmitter and receiver of the first proximity sensor, as shown in fig. 4; similarly, if the target proximity sensor identifies the corresponding target proximity sensor as the second proximity sensor, the turn-off submodule 131 is invoked to turn off the transmitter and receiver of the first proximity sensor, and the turn-on submodule 132 is invoked to turn on the transmitter and receiver of the second proximity sensor, as shown in fig. 5.
The proximity sensor switching device 10 further includes a mode acquiring module 14, an identifier acquiring module 15, and a storage module 16, which are described in detail as follows:
A mode acquisition module 14 for acquiring a holding mode; the identification acquisition module 15 is used for acquiring the identification of the proximity sensor corresponding to the holding mode; and the storage module 16 is used for establishing association between the holding mode and the proximity sensor identification and storing the association.
In some embodiments, the pre-call mode obtaining module 14 obtains a terminal holding mode, wherein the holding mode includes a left-hand holding mode and a right-hand holding mode. The left-hand holding mode is that the user holds the terminal with the left hand when talking. As shown in fig. 2, the terminal receiver 100 is placed on the ear, and the right part of the terminal receiver, i.e. the area a, will be close to the face. In the right-hand holding mode, when the user is talking, the user holds the terminal with the right hand, and the left part of the receiver 100 of the terminal, namely the area B, is close to the face of the user.
When the terminal is in the left-hand holding mode, the second proximity sensor should be turned on for distance detection, and when the terminal is in the right-hand holding mode, the first proximity sensor should be turned on for distance detection. Thus, when the mode acquisition module 14 acquires the left-hand grip mode, the identification acquisition module 15 acquires a second proximity sensor identification, wherein the second proximity sensor identification indicates a second proximity sensor; when the mode acquisition module 14 acquires the right-hand grip mode, the identification acquisition module 15 acquires a first proximity sensor identification, wherein the first proximity sensor identification indicates a first proximity sensor.
The left-hand grip pattern and the second proximity sensor, the right-hand grip pattern and the first proximity sensor are associated and stored by the storage module 16. In some embodiments, the association list may be established by the storage module 16 for storage. In some embodiments, a database may be established by the storage module 16 for storage.
The proximity sensor switching device provided by the embodiment of the invention selects and turns on the corresponding proximity sensor according to the holding mode of the terminal, so that the detection accuracy of the proximity sensor is improved.
In a preferred embodiment, a terminal is provided, for example, referring to fig. 2, the terminal 1000 may include a receiver 100, a first proximity sensor 200, a second proximity sensor 300, a memory 400 including one or more computer-readable storage media, an input unit 500, a display unit 600, and a processor 700 including one or more processing cores. Those skilled in the art will appreciate that the terminal configuration shown in fig. 2 is not intended to be limiting and may include more or fewer components than those shown, or some components may be combined, or a different arrangement of components.
The receiver 100 is a device that converts an audio electric signal into a sound signal without sound leakage. When the receiver 100 operates, the voice coil is disposed in a magnetic gap, so that the voice coil can sense the electromagnetic field force generated by the current change, and generate sound waves through vibration driving.
the first proximity sensor 200 and the second proximity sensor 300 are respectively located on both sides of the receiver 100, and detect a distance between the terminal and an obstacle together. In some embodiments, the terminal further includes a plurality of sensors such as a capacitive sensor 900 and a hand grip sensor 800.
The memory 400 may be used to store software programs and modules. The processor 700 executes various functional applications and data processing by executing software programs and modules stored in the memory 400. The memory 400 may mainly include a storage program area and a storage data area, wherein the storage program area may store an operating system, a target application (such as a sound playing function, an image playing function, etc.) required by at least one function, and the like; the storage data area may store data (such as audio data, a phonebook, etc.) created according to the use of the terminal, etc.
The input unit 500 may be used to receive input numeric or character information and generate keyboard, mouse, joystick, optical or trackball signal inputs related to user settings and function control.
The display unit 600 may be used to display information input by or provided to a user and various graphic user interfaces of a terminal, which may be configured by graphics, text, icons, video, and any combination thereof.
the processor 700 is a control center of the terminal, connects various parts of the entire terminal using various interfaces and lines, and performs various functions of the terminal and processes data by operating or executing software programs and/or modules stored in the memory 400 and calling data stored in the memory 400, thereby integrally monitoring the terminal.
Although not shown, the terminal may further include a power supply, a radio frequency module, a bluetooth module, a camera, and the like, which are not described in detail herein.
In the embodiment of the present invention, when the terminal is in a call state, the processor 700 first obtains a holding mode of the terminal and a proximity sensor identifier corresponding to a currently turned-on proximity sensor, then obtains a target proximity sensor identifier corresponding to the holding mode, then determines whether the proximity sensor identifier matches the target proximity sensor identifier, and finally switches to the target proximity sensor corresponding to the target proximity sensor identifier when the proximity sensor identifier does not match the target proximity sensor identifier.
Further, the processor 700 obtains capacitance information of a terminal frame, and then obtains a holding mode of the terminal according to the capacitance information of the terminal frame.
Further, the processor 700 compares the capacitance value of the left side frame of the terminal with the capacitance value of the right side frame of the terminal to obtain a comparison result; when the comparison result is that the capacitance value of the left side frame of the terminal is larger than that of the right side frame of the terminal, acquiring a right hand holding mode; and when the comparison result is that the capacitance value of the left side frame of the terminal is smaller than that of the right side frame of the terminal, acquiring a left hand holding mode.
Further, the processor 700 obtains the compression information of the terminal frame, and then obtains the holding mode of the terminal according to the compression information of the terminal frame.
Further, the processor 700 compares the number of the pressure values of the left side frame of the terminal with the number of the pressure values of the right side frame of the terminal to obtain a comparison result, and obtains a right hand holding mode when the comparison result indicates that the number of the pressure values of the left side frame is greater than the number of the pressure values of the right side frame; and when the comparison result is that the number of the pressure values of the left side frame is smaller than that of the pressure values of the right side frame, acquiring a left hand holding mode.
Further, the processor 700 also turns off the transmitter and receiver of the currently turned on proximity sensor and then turns on the transmitter and receiver of the target proximity sensor.
Further, the processor 700 further obtains a holding mode, then obtains a proximity sensor identifier corresponding to the holding mode, and finally establishes an association relationship between the holding mode and the proximity sensor identifier for storage.
As can be seen from the above, the preferred embodiment provides a terminal that selectively turns on a corresponding proximity sensor according to a holding mode of the terminal, thereby improving the accuracy of detection by the proximity sensor.
in specific implementation, the above modules may be implemented as independent entities, or may be combined arbitrarily to be implemented as the same or several entities, and specific implementation of the above modules may refer to the foregoing method embodiments, which are not described herein again.
It should be noted that, as one of ordinary skill in the art would understand, all or part of the steps in the various methods of the above embodiments may be implemented by relevant hardware instructed by a program, where the program may be stored in a computer-readable storage medium, such as a memory of a terminal, and executed by at least one processor in the terminal, and during the execution, the flow of the embodiments such as the information distribution method may be included. Among others, the storage medium may include: read Only Memory (ROM), Random Access Memory (RAM), magnetic or optical disks, and the like.
the method, the device and the terminal for prompting the hazardous environment provided by the embodiment of the invention are described in detail above, and each functional module of the method, the device and the terminal can be integrated in one processing chip, or each module can exist alone physically, or two or more modules can be integrated in one module. The integrated module can be realized in a hardware mode, and can also be realized in a software functional module mode. The principles and embodiments of the present invention have been described herein using specific examples, which are provided only to help understand the method and the core concept of the present invention; meanwhile, for those skilled in the art, according to the idea of the present invention, there may be variations in the specific embodiments and the application scope, and in summary, the content of the present specification should not be construed as a limitation to the present invention.

Claims (15)

1. A proximity sensor switching method, comprising:
When a terminal is in a call state, acquiring a holding mode of the terminal and a proximity sensor identifier corresponding to a currently started proximity sensor;
Acquiring a target proximity sensor identifier corresponding to the holding mode;
and when the proximity sensor identification is judged not to be matched with the target proximity sensor identification, switching the currently started proximity sensor to a target proximity sensor corresponding to the target proximity sensor identification.
2. The proximity sensor switching method according to claim 1, wherein the step of acquiring the holding mode of the terminal includes:
acquiring capacitance information of a terminal frame;
And acquiring the holding mode of the terminal according to the capacitance information of the terminal frame.
3. The proximity sensor switching method according to claim 2, wherein the capacitance information of the terminal frame includes a capacitance value of a left side frame of the terminal and a capacitance value of a right side frame of the terminal; the holding modes comprise a left-hand holding mode and a right-hand holding mode;
The step of obtaining the holding mode of the terminal according to the capacitance information of the terminal frame comprises the following steps:
Comparing the capacitance value of the left side frame of the terminal with the capacitance value of the right side frame of the terminal to obtain a comparison result;
If the comparison result is that the capacitance value of the left side frame of the terminal is larger than that of the right side frame of the terminal, acquiring a right hand holding mode;
And if the comparison result is that the capacitance value of the left side frame of the terminal is smaller than that of the right side frame of the terminal, acquiring a left-hand holding mode.
4. the proximity sensor switching method according to any one of claims 1 to 3, wherein the step of acquiring the holding mode of the terminal includes:
Acquiring the compression information of a terminal frame;
And acquiring the holding mode of the terminal according to the pressed information of the terminal frame.
5. The proximity sensor switching method according to claim 4, wherein the pressure information of the terminal frame includes a pressure value of a left side frame of the terminal and a pressure value of a right side frame of the terminal; the holding modes comprise a left-hand holding mode and a right-hand holding mode;
The step of obtaining the holding mode of the terminal according to the pressure information of the terminal frame comprises the following steps:
comparing the number of the pressure values of the left side frame of the terminal with the number of the pressure values of the right side frame of the terminal to obtain a comparison result;
if the comparison result shows that the number of the pressure values of the left side frame is larger than that of the pressure values of the right side frame, a right hand holding mode is obtained;
And if the comparison result shows that the number of the pressure values of the left side frame is smaller than that of the pressure values of the right side frame, acquiring a left hand holding mode.
6. The proximity sensor switching method according to any one of claims 1 to 3, wherein the step of switching the currently-turned-on proximity sensor to the target proximity sensor corresponding to the target proximity sensor identification comprises:
turning off the transmitter and receiver of the currently turned on proximity sensor;
Turning on the transmitter and receiver of the target proximity sensor.
7. The proximity sensor switching method according to any one of claims 1 to 3, wherein the step of acquiring the target proximity sensor identification corresponding to the holding mode further includes:
Acquiring a holding mode;
acquiring a proximity sensor identifier corresponding to the holding mode;
and establishing an association relationship between the holding mode and the proximity sensor identification for storage.
8. A proximity sensor switching apparatus, comprising:
The terminal comprises a first acquisition module, a second acquisition module and a control module, wherein the first acquisition module is used for acquiring a holding mode of the terminal and a proximity sensor identifier corresponding to a currently started proximity sensor when the terminal is in a call state;
The second acquisition module is used for acquiring the target proximity sensor identifier corresponding to the holding mode;
and the switching module is used for switching the currently started proximity sensor to a target proximity sensor corresponding to the target proximity sensor identification when the proximity sensor identification is judged not to be matched with the target proximity sensor identification.
9. the proximity sensor switching apparatus according to claim 8, wherein the first acquisition module includes:
the first obtaining submodule is used for obtaining capacitance information of a terminal frame;
And the second acquisition submodule is used for acquiring the holding mode of the terminal according to the capacitance information of the terminal frame.
10. The proximity sensor switching apparatus according to claim 9, wherein the capacitance information of the terminal frame includes a capacitance value of a left side frame of the terminal and a capacitance value of a right side frame of the terminal; the holding modes comprise a left-hand holding mode and a right-hand holding mode;
the second obtaining sub-module is configured to:
Comparing the capacitance value of the left side frame of the terminal with the capacitance value of the right side frame of the terminal to obtain a comparison result;
When the comparison result is that the capacitance value of the left side frame of the terminal is larger than that of the right side frame of the terminal, acquiring a right hand holding mode;
And when the comparison result is that the capacitance value of the left side frame of the terminal is smaller than that of the right side frame of the terminal, acquiring a left hand holding mode.
11. The proximity sensor switching apparatus according to any one of claims 8 to 10, wherein the first acquisition module includes:
The first acquisition submodule is used for acquiring the compression information of the terminal frame;
And the second acquisition submodule is used for acquiring the holding mode of the terminal according to the compression information of the terminal frame.
12. The proximity sensor switching apparatus according to claim 11, wherein the pressure information of the terminal frame includes a pressure value of a left side frame of the terminal and a pressure value of a right side frame of the terminal; the holding modes comprise a left-hand holding mode and a right-hand holding mode;
The second obtaining sub-module is configured to:
comparing the number of the pressure values of the left side frame of the terminal with the number of the pressure values of the right side frame of the terminal to obtain a comparison result;
When the comparison result shows that the number of the pressure values of the left side frame is larger than that of the pressure values of the right side frame, acquiring a right hand holding mode;
And when the comparison result is that the number of the pressure values of the left side frame is smaller than that of the pressure values of the right side frame, acquiring a left hand holding mode.
13. The proximity sensor switching apparatus according to any one of claims 8 to 10, wherein the switching module comprises:
a shutdown submodule to shut down the transmitter and receiver of the currently turned on proximity sensor;
and the starting submodule is used for starting the transmitter and the receiver of the target proximity sensor.
14. the proximity sensor switching apparatus according to any one of claims 8 to 10, further comprising:
The mode acquisition module is used for acquiring a holding mode;
The identification acquisition module is used for acquiring the identification of the proximity sensor corresponding to the holding mode;
And the storage module is used for establishing association between the holding mode and the proximity sensor identification and storing the association.
15. A terminal, comprising:
A memory storing executable program code;
a processor coupled with the memory;
the processor calls the executable program code stored in the memory to execute the method according to any one of claims 1 to 7.
CN201611107921.3A 2016-12-06 2016-12-06 proximity sensor switching method and device and terminal Active CN106775308B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201611107921.3A CN106775308B (en) 2016-12-06 2016-12-06 proximity sensor switching method and device and terminal

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201611107921.3A CN106775308B (en) 2016-12-06 2016-12-06 proximity sensor switching method and device and terminal

Publications (2)

Publication Number Publication Date
CN106775308A CN106775308A (en) 2017-05-31
CN106775308B true CN106775308B (en) 2019-12-10

Family

ID=58879070

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201611107921.3A Active CN106775308B (en) 2016-12-06 2016-12-06 proximity sensor switching method and device and terminal

Country Status (1)

Country Link
CN (1) CN106775308B (en)

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110138974B (en) * 2019-05-20 2021-06-01 西安易朴通讯技术有限公司 Screen control method, device, equipment and computer readable storage medium
CN113253826B (en) * 2020-02-10 2024-04-12 华为技术有限公司 Control method, device, terminal and storage medium

Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103583031A (en) * 2011-06-03 2014-02-12 苹果公司 Motion-based device operations
KR20150033310A (en) * 2013-09-24 2015-04-01 엘지전자 주식회사 Mobile terminal
WO2015134288A1 (en) * 2014-03-04 2015-09-11 Microsoft Technology Licensing, Llc Proximity sensor-based interactions
CN105227761A (en) * 2015-08-31 2016-01-06 小米科技有限责任公司 The determination methods of user's hand-held and device
CN105468269A (en) * 2014-08-15 2016-04-06 深圳市中兴微电子技术有限公司 Mobile terminal capable of automatically identifying holding by left hand or right hand, and implementation method thereof
CN105493478A (en) * 2013-08-23 2016-04-13 罗姆股份有限公司 Portable telephone
CN105960626A (en) * 2014-01-21 2016-09-21 微软技术许可有限责任公司 Grip detection

Patent Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103583031A (en) * 2011-06-03 2014-02-12 苹果公司 Motion-based device operations
CN105493478A (en) * 2013-08-23 2016-04-13 罗姆股份有限公司 Portable telephone
KR20150033310A (en) * 2013-09-24 2015-04-01 엘지전자 주식회사 Mobile terminal
CN105960626A (en) * 2014-01-21 2016-09-21 微软技术许可有限责任公司 Grip detection
WO2015134288A1 (en) * 2014-03-04 2015-09-11 Microsoft Technology Licensing, Llc Proximity sensor-based interactions
CN105468269A (en) * 2014-08-15 2016-04-06 深圳市中兴微电子技术有限公司 Mobile terminal capable of automatically identifying holding by left hand or right hand, and implementation method thereof
CN105227761A (en) * 2015-08-31 2016-01-06 小米科技有限责任公司 The determination methods of user's hand-held and device

Also Published As

Publication number Publication date
CN106775308A (en) 2017-05-31

Similar Documents

Publication Publication Date Title
KR101932210B1 (en) Method, system for implementing operation of mobile terminal according to touching signal and mobile terminal
US10739854B2 (en) Terminal and touch response method and device
US10862595B2 (en) Method for processing radio frequency interference, and electronic device
US10628649B2 (en) Fingerprint recognition proccess
KR20100081575A (en) Apparatus and method for controlling on/off of liquid crystal display in a portable terminal
CN106936993B (en) Terminal screen control method and device
CN110209452B (en) Page display method of mobile terminal and mobile terminal
CN106096515B (en) A kind of solution lock control method and terminal device
CN105468217A (en) Mobile terminal for replacing power button by capacitive sensor and relation method of mobile terminal
CN103699260A (en) Method for starting terminal function module, and terminal equipment
CN112230877A (en) Voice operation method and device, storage medium and electronic equipment
CN105607738B (en) Determine the method and device of one hand pattern
US10885298B2 (en) Method and device for optical fingerprint recognition, and computer-readable storage medium
CN111954110A (en) Earphone interaction method and earphone
CN106775308B (en) proximity sensor switching method and device and terminal
CN110930964B (en) Display screen brightness adjusting method and device, storage medium and terminal
CN110244849B (en) Proximity recognition method and device, mobile terminal and storage medium
CN109639370B (en) Near field communication antenna detection method and device, mobile terminal and storage medium
CN109164908B (en) Interface control method and mobile terminal
KR20220166853A (en) Display method and electronic device
CN113253964A (en) Data management method, device, equipment and storage medium
CN109002339A (en) touch operation method, device, storage medium and electronic equipment
CN111327744B (en) Function control assembly and electronic equipment
CN111970593A (en) Wireless earphone control method and device and wireless earphone
CN109743445B (en) Application icon adjusting method and device, storage medium and electronic equipment

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
CB02 Change of applicant information

Address after: Changan town in Guangdong province Dongguan 523860 usha Beach Road No. 18

Applicant after: OPPO Guangdong Mobile Communications Co., Ltd.

Address before: Changan town in Guangdong province Dongguan 523860 usha Beach Road No. 18

Applicant before: Guangdong Opel Mobile Communications Co., Ltd.

CB02 Change of applicant information
GR01 Patent grant
GR01 Patent grant