CN108063994B - Mobile terminal, earphone detection control method, storage medium and earphone - Google Patents

Mobile terminal, earphone detection control method, storage medium and earphone Download PDF

Info

Publication number
CN108063994B
CN108063994B CN201711395426.1A CN201711395426A CN108063994B CN 108063994 B CN108063994 B CN 108063994B CN 201711395426 A CN201711395426 A CN 201711395426A CN 108063994 B CN108063994 B CN 108063994B
Authority
CN
China
Prior art keywords
earphone
temperature
mobile terminal
receiver
detection control
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
CN201711395426.1A
Other languages
Chinese (zh)
Other versions
CN108063994A (en
Inventor
俞斌
杨维琴
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Shenzhen Huaxi Investment Co ltd
Original Assignee
TCL Mobile Communication Technology Ningbo 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 TCL Mobile Communication Technology Ningbo Ltd filed Critical TCL Mobile Communication Technology Ningbo Ltd
Priority to CN201711395426.1A priority Critical patent/CN108063994B/en
Publication of CN108063994A publication Critical patent/CN108063994A/en
Application granted granted Critical
Publication of CN108063994B publication Critical patent/CN108063994B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04RLOUDSPEAKERS, MICROPHONES, GRAMOPHONE PICK-UPS OR LIKE ACOUSTIC ELECTROMECHANICAL TRANSDUCERS; DEAF-AID SETS; PUBLIC ADDRESS SYSTEMS
    • H04R1/00Details of transducers, loudspeakers or microphones
    • H04R1/10Earpieces; Attachments therefor ; Earphones; Monophonic headphones
    • H04R1/1041Mechanical or electronic switches, or control elements
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04RLOUDSPEAKERS, MICROPHONES, GRAMOPHONE PICK-UPS OR LIKE ACOUSTIC ELECTROMECHANICAL TRANSDUCERS; DEAF-AID SETS; PUBLIC ADDRESS SYSTEMS
    • H04R2420/00Details of connection covered by H04R, not provided for in its groups
    • H04R2420/05Detection of connection of loudspeakers or headphones to amplifiers

Landscapes

  • Physics & Mathematics (AREA)
  • Engineering & Computer Science (AREA)
  • Acoustics & Sound (AREA)
  • Signal Processing (AREA)
  • Telephone Function (AREA)

Abstract

The invention discloses a mobile terminal, an earphone detection control method, a storage medium and an earphone, wherein the method comprises the following steps: a temperature sensor is arranged in the earphone in advance; acquiring the current temperature of the surface of the earphone receiver from the temperature sensor at intervals of fixed time; judging whether the temperature of the surface of the earphone receiver detected currently is within a preset range; when the currently detected temperature of the surface of the earphone receiver is in a preset range, the receiver state is controlled to be in an on state. According to the invention, after the user inserts the earphone into the earphone interface in the mobile terminal, whether the earphone plays sound can be controlled according to whether the user uses the earphone, so that energy waste caused by the fact that the earphone plays sound when not used is avoided, and convenience is provided for the user.

Description

Mobile terminal, earphone detection control method, storage medium and earphone
Technical Field
The present invention relates to the field of mobile terminals, and in particular, to a mobile terminal, a method for controlling detection of an earphone, a storage medium, and an earphone.
Background
At present, mobile terminals are equipped with earphone interfaces, so that users can insert earphones into the earphone interfaces of the mobile terminals, and sounds played by the mobile terminals are emitted by the earphones, thereby facilitating the users. In the prior art, after the earphone is inserted into an earphone interface in the mobile terminal, the sound output of the mobile terminal starts to be collected and played, no matter whether the user wears the earphone or not, the process is normal when the user wears the earphone, and the sound is continuously played from the earphone when the user does not wear the earphone, so that the energy is consumed on the earphone, but the user does not use the earphone, and the energy consumption is wasted.
Therefore, the prior art has defects and needs to be improved and developed.
Disclosure of Invention
The present invention is directed to a mobile terminal, a method for controlling detection of an earphone, a storage medium, and an earphone, which are provided to overcome the above-mentioned drawbacks of the prior art. The earphone is inserted into the earphone interface of the mobile terminal by a user, whether the earphone plays sound can be controlled according to whether the user uses the earphone or not, energy waste caused by the fact that the earphone plays sound when not used is avoided, energy consumption is effectively saved, the utilization rate is improved, and convenience is brought to the user.
The technical scheme adopted by the invention for solving the technical problem is as follows:
a mobile terminal earphone detection control method comprises the following steps:
A. a temperature sensor is arranged in the earphone in advance; acquiring the current temperature of the surface of the earphone receiver from the temperature sensor at intervals of fixed time;
B. judging whether the temperature of the surface of the earphone receiver detected currently is within a preset range;
and C, when the currently detected temperature of the surface of the earphone receiver is in a preset range, controlling the receiver state to be in the on state.
The mobile terminal earphone detection control method, wherein the step B further comprises:
and B1, if the difference between the currently detected surface temperature of the earphone receiver and the last acquired surface temperature of the earphone receiver is larger than a preset threshold value, acquiring the current state of the earphone receiver.
The mobile terminal earphone detection control method, wherein the step C further comprises:
c1, if the detected temperature of the surface of the earphone is higher than the last acquired temperature, the difference is larger than a preset threshold value, and the earphone is switched off when the earphone is switched on, and is switched on when the earphone is switched off.
The mobile terminal earphone detection control method is characterized in that the preset range is 35-38 degrees.
The mobile terminal earphone detection control method is characterized in that the fixed time in the step A is 100 ms.
In the method for controlling earphone detection of a mobile terminal, the preset threshold in the step B1 is 2 degrees.
An earphone for executing the earphone detection control method of the mobile terminal comprises the following steps: a headphone, wherein, still include: and the temperature sensor is arranged on the surface of the earphone receiver.
A mobile terminal comprises a processor, a memory connected with the processor, and an earphone as described above, wherein the earphone is electrically connected with the processor through an earphone plug, the memory stores an earphone detection control program, and the earphone detection control program realizes the following steps when executed by the processor;
A. a temperature sensor is arranged in the earphone in advance; starting a timer, and triggering a temperature acquisition module at intervals of a fixed time to acquire the current temperature of the surface of the earphone receiver from a temperature sensor;
B. judging whether the temperature of the surface of the earphone receiver detected currently is within a preset range;
c, when the currently detected temperature of the surface of the earphone receiver of the earphone is in a preset range, controlling the state of the earphone receiver to be a connection state;
the processor is configured to invoke the earphone detection control program instruction.
The mobile terminal, wherein the earphone detection control program, when executed by the processor, further implements the following steps:
b1, if the difference between the currently detected surface temperature of the earphone receiver and the last acquired temperature is larger than a preset threshold value, acquiring the current state of the earphone receiver;
c1, if the detected surface temperature of the earphone is higher than the last acquired temperature, the difference is larger than a preset threshold value, and the earphone is switched on, then it is switched off, if the earphone is switched off, then it is switched on;
the predetermined range is 35 to 38 degrees; the fixed time in the step A is 100 ms; the preset threshold in step B1 is 2 degrees.
A storage medium, wherein the storage medium stores a headset detection control program, and the headset detection control program realizes the steps of any one of the mobile terminal headset detection control methods when executed by a processor.
By the mobile terminal, the earphone detection control method, the storage medium and the earphone, whether the earphone plays sound can be controlled according to whether the user uses the earphone or not after the user inserts the earphone into the earphone interface in the mobile terminal, energy waste caused by the fact that the earphone plays sound when not used is avoided, and convenience is provided for the user.
Drawings
Fig. 1 is a flowchart of a mobile terminal earphone detection control method according to a first preferred embodiment of the present invention.
Fig. 2 is a flowchart of a mobile terminal earphone detection control method according to a second preferred embodiment of the present invention.
Fig. 3 is a functional block diagram of a mobile terminal according to a preferred embodiment of the present invention.
Detailed Description
In order to make the objects, technical solutions and advantages of the present invention clearer and clearer, the present invention is further described in detail below with reference to the accompanying drawings and examples. It should be understood that the specific embodiments described herein are merely illustrative of the invention and are not intended to limit the invention.
The first embodiment,
Referring to fig. 1, fig. 1 is a flowchart illustrating a method for controlling earphone detection of a mobile terminal according to a preferred embodiment of the present invention. As shown in fig. 1, the method for detecting and controlling the earphone of the mobile terminal according to the embodiment of the present invention includes the following steps:
step S10, setting a temperature sensor in the earphone in advance; the current temperature of the surface of the earphone receiver is obtained from the temperature sensor at regular intervals.
In the embodiment of the invention, when the mobile terminal is implemented, a temperature sensor needs to be arranged on the surface of the earphone of the mobile terminal in advance. When the mobile terminal detects that the earphone is connected, a timer is started, and the temperature acquisition module is triggered at intervals of fixed time to acquire the current temperature of the surface of the earphone receiver of the earphone from the temperature sensor.
Step S20, determining whether the currently detected temperature of the surface of the headphone is within a predetermined range.
In this embodiment, when the earphone is plugged into the mobile terminal, it is determined whether the currently detected temperature on the surface of the earphone receiver is within a predetermined range, preferably 35 to 38 degrees, which is generally a temperature sensed by contacting a human body, that is, indicating that the mobile terminal is worn around the ear of a person.
And step S30, when the currently detected temperature of the surface of the earphone receiver is in a preset range, controlling the receiver state to be in an on state.
In the embodiment of the present invention, when the currently detected temperature of the surface of the earphone receiver is within a predetermined range (i.e., 35 to 38 degrees), the receiver state is controlled to be the on state. It is of course preferred that the present invention is preferably arranged to control the earpiece state to the on state if it is detected that the temperature of the earpiece surface is within a predetermined range (i.e. 35 to 38 degrees) and continues for a predetermined time, for example 2 seconds, in order to prevent false positives. Therefore, the detection is more accurate, and the energy conservation is more facilitated.
Example two:
referring to fig. 2, fig. 2 is a flowchart illustrating a method for controlling earphone detection of a mobile terminal according to a second preferred embodiment of the present invention. As shown in fig. 2, the method for detecting and controlling the earphone of the mobile terminal according to the present invention includes the following steps:
step S100, setting a temperature sensor in the earphone in advance; starting a timer, and triggering a temperature acquisition module at intervals of a fixed time to acquire the current temperature of the surface of the earphone receiver from a temperature sensor;
specifically, in step S100, the fixed time is set when the mobile terminal is produced, and the user cannot modify the fixed time, and preferably, the fixed time may be 100ms, so as to ensure real-time performance of detecting whether the earphone is worn by the user when the user uses the mobile terminal.
Step S200, if the temperature is compared with the temperature obtained last time, and the difference value is larger than a preset threshold value, obtaining the current state of the earphone receiver;
specifically, in step S200, the preset threshold is set when the mobile terminal is produced, and cannot be modified by the user, and preferably, the preset threshold may be 2 degrees;
step S300, if the current earphone is in the on state, the earphone is set to be in the off state, and if the current earphone is in the off state, the earphone is set to be in the on state;
specifically, in steps S200 to S300, the states of the earphone receiver include two states: the first is an on state and the second is an off state; when the state of the earphone is the first on state, the earphone is connected with the earphone line, so that the sound signal on the earphone line can be played through the earphone, and when the state of the earphone is the second off state, the earphone is disconnected with the earphone line, so that the sound signal on the earphone line cannot be played through the earphone.
EXAMPLE III
The invention also provides a flow of a third preferred embodiment of the mobile terminal earphone detection control method, and the method comprises the following steps:
step S1, starting a timer T1, acquiring the earphone receiver surface temperature D1 from the temperature sensor through the temperature acquisition module, and then entering step S2;
step S2, setting the current headphone surface temperature D2 = D1, and then proceeding to step S3;
step S3, judging whether the timer T1 is overtime, if yes, entering step S4, otherwise, continuing to wait for the timer T1 to be overtime;
step S4, the temperature obtaining module obtains the earphone surface temperature D2, and then step S5 is carried out;
step S5, judging whether the absolute value of the subtraction between D2 and D1 is larger than a preset threshold value (2 here), if so, entering step S6, otherwise, entering step S2;
step S6, acquiring the current state of the earphone, and then entering step S7;
step S7, judging whether the current state of the earphone is a connection state, if so, entering step S8, otherwise, entering step S9;
step S8, setting the earphone receiver to be in a disconnected state;
and step S9, setting the earphone receiver to be in the on state.
Therefore, the invention provides a mobile terminal earphone detection control method, which enables whether the earphone plays sound to be controlled according to whether the user uses the earphone or not after the user inserts the earphone into an earphone interface in the mobile terminal, avoids energy waste caused by the fact that the earphone plays sound when not used, and provides convenience for the user.
Of course, it will be understood by those skilled in the art that all or part of the processes of the methods of the above embodiments may be implemented by instructing relevant hardware (such as a processor, a controller, etc.) through an earphone detection control program, where the program may be stored in a computer-readable storage medium, and when executed, the program may include the processes of the above method embodiments. The storage medium may be a memory, a magnetic disk, an optical disk, etc.
Example four
The invention also provides an earphone for executing the mobile terminal earphone detection control method in any one of the embodiments, which comprises the following steps: a headphone, further comprising: the temperature sensor is arranged on the surface of the earphone receiver, and the temperature of the surface of the earphone receiver is obtained through the temperature sensor.
EXAMPLE five
The embodiment of the present invention further provides a mobile terminal, which may be a mobile phone, as shown in fig. 3, the mobile terminal of the embodiment of the present invention includes a processor 10 and a memory 20 connected to the processor 10; also included is a headset 30 as described in the previous embodiments, which is electrically connected to the processor 20 by a headset plug.
The memory 20 stores an earphone detection control program, and the earphone detection control program, when executed by the processor, implements the steps of the mobile terminal earphone detection control method according to any one of the above embodiments, and specifically implements the following method steps:
A. a temperature sensor is arranged in the earphone in advance; starting a timer, and triggering a temperature acquisition module at intervals of a fixed time to acquire the current temperature of the surface of the earphone receiver from a temperature sensor;
B. judging whether the temperature of the surface of the earphone receiver detected currently is within a preset range;
c, when the currently detected temperature of the surface of the earphone receiver of the earphone is in a preset range, controlling the state of the earphone receiver to be a connection state; the predetermined range is 35 to 38 degrees;
the processor is configured to invoke the earphone detection control program instruction, as described above.
Wherein the earphone detection control program, when executed by the processor, further implements the steps of:
b1, if the difference between the currently detected surface temperature of the earphone receiver and the last acquired temperature is larger than a preset threshold value, acquiring the current state of the earphone receiver;
c1, if the detected surface temperature of the earphone is higher than the last acquired temperature, the difference is larger than a preset threshold value, and the earphone is switched on, then it is switched off, if the earphone is switched off, then it is switched on;
the fixed time in the step A is 100 ms; the preset threshold in step B1 is 2 degrees, as described above.
EXAMPLE III
An embodiment of the present invention further provides a storage medium, where an earphone detection control program is stored, and the earphone detection control program, when executed by a processor, implements the steps of the mobile terminal earphone detection control method, as described above.
In summary, according to the mobile terminal, the earphone detection control method, the storage medium and the earphone provided by the invention, after the user inserts the earphone into the earphone interface of the mobile terminal, whether the earphone plays sound can be controlled according to whether the user uses the earphone, so that energy waste caused by the fact that the earphone plays sound when not used is avoided, and convenience is provided for the user.
It is to be understood that the invention is not limited to the examples described above, but that modifications and variations may be effected thereto by those of ordinary skill in the art in light of the foregoing description, and that all such modifications and variations are intended to be within the scope of the invention as defined by the appended claims.

Claims (8)

1. A mobile terminal earphone detection control method is characterized by comprising the following steps:
A. a temperature sensor is arranged in the earphone in advance; acquiring the current temperature of the surface of the earphone receiver from the temperature sensor at intervals of fixed time;
the step A also comprises the following steps:
when the mobile terminal detects that the earphone is connected, starting a timer;
B. judging whether the temperature of the surface of the earphone receiver detected currently is within a preset range;
the step B also comprises the following steps:
b1, if the difference between the currently detected surface temperature of the earphone receiver and the last acquired temperature is larger than a preset threshold value, acquiring the current state of the earphone receiver;
the preset threshold value is set when the mobile terminal is produced;
C. when the currently detected temperature of the surface of the earphone receiver is within a preset range and continues for a preset time, controlling the state of the earphone receiver to be a connection state;
step C also includes:
c1, if the detected temperature of the surface of the earphone is higher than the last acquired temperature, the difference is larger than a preset threshold value, and the earphone is switched off when the earphone is switched on, and is switched on when the earphone is switched off.
2. The mobile terminal earphone detection control method of claim 1, wherein the predetermined range is 35 to 38 degrees.
3. The mobile terminal earphone detection control method of claim 1, wherein the fixed time in step a is 100 ms.
4. The mobile terminal earphone detection control method of claim 2, wherein the preset threshold in the step B1 is 2 degrees.
5. An earphone for performing the mobile terminal earphone detection control method of any one of the above claims 1-4, comprising: earphone, its characterized in that still includes: and the temperature sensor is arranged on the surface of the earphone receiver.
6. A mobile terminal comprising a processor, and a memory coupled to the processor, and further comprising the headset of claim 5, the headset being electrically coupled to the processor via a headset plug, the memory storing a headset detection control program that when executed by the processor performs the steps of;
A. a temperature sensor is arranged in the earphone in advance; starting a timer, and triggering a temperature acquisition module at intervals of a fixed time to acquire the current temperature of the surface of the earphone receiver from a temperature sensor;
B. judging whether the temperature of the surface of the earphone receiver detected currently is within a preset range;
when the earphone detection control program is executed by the processor, the following steps are also realized:
b1, if the difference between the currently detected surface temperature of the earphone receiver and the last acquired temperature is larger than a preset threshold value, acquiring the current state of the earphone receiver;
c, when the currently detected surface temperature of the earphone receiver is in a preset range and continues for a preset time, controlling the receiver state to be a connection state;
c1, if the detected surface temperature of the earphone is higher than the last acquired temperature, the difference is larger than a preset threshold value, and the earphone is switched on, then it is switched off, if the earphone is switched off, then it is switched on;
the preset threshold value is set when the mobile terminal is produced; the processor is configured to invoke the earphone detection control program instruction.
7. The mobile terminal of claim 6, wherein the predetermined range is 35 to 38 degrees; the fixed time in the step A is 100 ms; the preset threshold in step B1 is 2 degrees.
8. A storage medium storing a headset detection control program, the headset detection control program when executed by a processor implementing the steps of the headset detection control method of the mobile terminal according to any one of claims 1 to 4.
CN201711395426.1A 2017-12-21 2017-12-21 Mobile terminal, earphone detection control method, storage medium and earphone Active CN108063994B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201711395426.1A CN108063994B (en) 2017-12-21 2017-12-21 Mobile terminal, earphone detection control method, storage medium and earphone

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201711395426.1A CN108063994B (en) 2017-12-21 2017-12-21 Mobile terminal, earphone detection control method, storage medium and earphone

Publications (2)

Publication Number Publication Date
CN108063994A CN108063994A (en) 2018-05-22
CN108063994B true CN108063994B (en) 2020-07-14

Family

ID=62139683

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201711395426.1A Active CN108063994B (en) 2017-12-21 2017-12-21 Mobile terminal, earphone detection control method, storage medium and earphone

Country Status (1)

Country Link
CN (1) CN108063994B (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113507680B (en) * 2021-06-17 2023-05-16 闻泰通讯股份有限公司 Type-C earphone identification method and device, electronic equipment and storage medium

Family Cites Families (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR102049781B1 (en) * 2013-02-26 2019-11-28 삼성전자 주식회사 Application Controlling Method of Electronic Device and Apparatus thereof, and Earphone device and Application Controlling system supporting the same
CN104113794A (en) * 2013-04-22 2014-10-22 联想(北京)有限公司 Information processing method, information processing system and headset
US9632532B2 (en) * 2014-07-23 2017-04-25 Lenovo (Singapore) Pte. Ltd. Configuring wearable devices
CN104616676A (en) * 2014-12-15 2015-05-13 惠州Tcl移动通信有限公司 Multimedia file playing method and system based on headset using state
CN106293601A (en) * 2016-08-09 2017-01-04 乐视控股(北京)有限公司 A kind of audio frequency playing method and device

Also Published As

Publication number Publication date
CN108063994A (en) 2018-05-22

Similar Documents

Publication Publication Date Title
WO2017147966A1 (en) Headphone control method, headphone, and terminal
JP6247384B2 (en) Air conditioner activation method, air conditioner activation apparatus, computer program, and computer-readable storage medium
US9420369B2 (en) Processing method for earphone and user equipment
US20150142141A1 (en) Electronic device and remote control method
KR102542279B1 (en) Spectacles having wireless charging receiver circuit, spectacle case for spectacles, and system
CN106339198B (en) Method and system for automatically adjusting volume of electronic equipment through environment volume
US20210144496A1 (en) Microphone Hole Blockage Detection Method, Microphone Hole Blockage Detection Device, and Wireless Earphone
CN109547897B (en) Wireless earphone connection method, device and system and wireless earphone box
CN106792314B (en) A kind of detection method of ear-sticking headphone and its wearing state
CN109121048B (en) True wireless stereo earphone and standby management method and device thereof
WO2014183529A1 (en) Mobile terminal talk mode switching method, device and storage medium
WO2016119108A1 (en) Earphone noise reduction control method and apparatus
CN110166870A (en) A kind of earphone charging base and wireless headset awakening method with arousal function
JP2008289033A (en) Apparatus for detecting use of earphone, portable acoustic equipment, portable acoustic equipment control program, recording medium, and portable acoustic equipment control method
US20210250677A1 (en) Interactive control method and device of an earphone case, earphone case and storage medium
US20210399564A1 (en) Earpiece Charging Case Detection
CN108063994B (en) Mobile terminal, earphone detection control method, storage medium and earphone
CN105390120A (en) Bright screen control method and device
CN106502368B (en) OTG peripheral control method and system of mobile terminal
CN109068226B (en) Earphone and control method thereof
CN106982292A (en) A kind of alarm clock prompting method and system
TW201625020A (en) Headset and controlling handheld device system, method
CN106095637B (en) Intelligent terminal control method and device and intelligent terminal
CN105812972B (en) System and method for controlling handheld device by utilizing earphone
CN110972022B (en) TWS earphone and method, device and medium for reducing energy consumption of same

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
TR01 Transfer of patent right
TR01 Transfer of patent right

Effective date of registration: 20230324

Address after: 518000 Room 201, building A, No. 1, Qian Wan Road, Qianhai Shenzhen Hong Kong cooperation zone, Shenzhen, Guangdong (Shenzhen Qianhai business secretary Co., Ltd.)

Patentee after: Shenzhen Huaxi Investment Co.,Ltd.

Address before: 10 / F, No.5, Lane 999, Yangfan Road, high tech Zone, Ningbo, Zhejiang 315100

Patentee before: TCL mobile communication technology (Ningbo) Co.,Ltd.