CN106385493B - A kind of gravity sensor register method, device and mobile terminal - Google Patents

A kind of gravity sensor register method, device and mobile terminal Download PDF

Info

Publication number
CN106385493B
CN106385493B CN201610806727.8A CN201610806727A CN106385493B CN 106385493 B CN106385493 B CN 106385493B CN 201610806727 A CN201610806727 A CN 201610806727A CN 106385493 B CN106385493 B CN 106385493B
Authority
CN
China
Prior art keywords
terminal
gravity sensor
light intensity
ambient light
less
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.)
Expired - Fee Related
Application number
CN201610806727.8A
Other languages
Chinese (zh)
Other versions
CN106385493A (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 CN201610806727.8A priority Critical patent/CN106385493B/en
Publication of CN106385493A publication Critical patent/CN106385493A/en
Application granted granted Critical
Publication of CN106385493B publication Critical patent/CN106385493B/en
Expired - Fee Related legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04MTELEPHONIC COMMUNICATION
    • H04M1/00Substation equipment, e.g. for use by subscribers
    • H04M1/72Mobile telephones; Cordless telephones, i.e. devices for establishing wireless links to base stations without route selection
    • H04M1/724User interfaces specially adapted for cordless or mobile telephones
    • H04M1/72448User interfaces specially adapted for cordless or mobile telephones with means for adapting the functionality of the device according to specific conditions
    • H04M1/72454User interfaces specially adapted for cordless or mobile telephones with means for adapting the functionality of the device according to specific conditions according to context-related or environment-related conditions
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04WWIRELESS COMMUNICATION NETWORKS
    • H04W52/00Power management, e.g. TPC [Transmission Power Control], power saving or power classes
    • H04W52/02Power saving arrangements
    • H04W52/0209Power saving arrangements in terminal devices
    • H04W52/0251Power saving arrangements in terminal devices using monitoring of local events, e.g. events related to user activity
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04MTELEPHONIC COMMUNICATION
    • H04M2250/00Details of telephonic subscriber devices
    • H04M2250/12Details of telephonic subscriber devices including a sensor for measuring a physical value, e.g. temperature or motion
    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02DCLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
    • Y02D30/00Reducing energy consumption in communication networks
    • Y02D30/70Reducing energy consumption in communication networks in wireless communication networks

Abstract

The embodiment of the invention discloses a kind of gravity sensor register method, device and mobile terminals;This method includes the ambient light intensity for obtaining terminal current environment;Judge whether ambient light intensity is less than default ambient light intensity;If ambient light intensity is less than default ambient light intensity, then the distance between terminal and shelter are obtained;Judge whether distance is less than pre-determined distance threshold value;Such as less than pre-determined distance threshold value is then forbidden using registration gravity sensor;The program is by the way that in terminal, there is no when falling risk, forbid reducing power consumption of terminal using registration gravity sensor.

Description

A kind of gravity sensor register method, device and mobile terminal
Technical field
The present invention relates to field of terminal technology, and in particular to a kind of gravity sensor register method, device and mobile terminal.
Background technique
With the development of terminal technology, various mobile terminals such as smart phone using more more and more universal, smart phone is At indispensable means of communication in for people's lives.
In the use process of the terminals such as smart phone, user is easy to cause mobile phone to fall due to accidentally.At this point, terminal The event of falling generally is detected by gravity sensor, therefore the application in terminal only keeps duration to register gravity sensor Related drop information could be obtained at the first time.The registration behavior of this duration will lead to power consumption of terminal increase.For example work as end When end is in closed space (in such as pocket or knapsack), terminal can't be fallen at this time, at this time if still allowed using lasting Property registration gravity sensor, it will cause power consumption of terminal to increase.
Summary of the invention
The embodiment of the present invention provides a kind of gravity sensor register method, device and mobile terminal, can solve existing The big technical problem of gravity sensor register method power consumption.
The embodiment of the present invention provides a kind of gravity sensor register method, comprising:
Obtain the ambient light intensity of terminal current environment;
Judge whether the ambient light intensity is less than default ambient light intensity;
Such as less than default ambient light intensity, then obtain the distance between the terminal and shelter;
Judge whether the distance is less than pre-determined distance threshold value;
Such as less than pre-determined distance threshold value is then forbidden using registration gravity sensor.
The embodiment of the invention also provides a kind of gravity sensor register devices, comprising:
First obtains module, for obtaining the ambient light intensity of terminal current environment;
First judgment module, for judging whether the ambient light intensity is less than default ambient light intensity;
Second obtains module, for when being less than default ambient light intensity, obtain between the terminal and shelter away from From;
Second judgment module, for judging whether the distance is less than pre-determined distance threshold value;
First disabled module, for when being less than pre-determined distance threshold value, forbidding using registration gravity sensor.
The embodiment of the invention also provides a kind of mobile terminals, including gravity sensor, and with the gravity sensor The gravity sensor register device of connection, wherein the gravity sensor register device includes:
First obtains module, for obtaining the ambient light intensity of terminal current environment;
First judgment module, for judging whether the ambient light intensity is less than default ambient light intensity;
Second obtains module, for when being less than default ambient light intensity, obtain between the terminal and shelter away from From;
Second judgment module, for judging whether the distance is less than pre-determined distance threshold value;
First disabled module, for when being less than pre-determined distance threshold value, forbidding using registration gravity sensor.
The embodiment of the present invention is using the ambient light intensity for obtaining terminal current environment;Judge whether ambient light intensity is small In default ambient light intensity;If ambient light intensity is less than default ambient light intensity, then the distance between terminal and shelter are obtained; Judge whether distance is less than pre-determined distance threshold value;Such as less than pre-determined distance threshold value is then forbidden using registration gravity sensor.The party Case falls risk by judging whether terminal has, to decide whether to allow using registration gravity sensor, thus selective Ground Register Sensor, and then reduce power consumption of terminal.
Detailed description of the invention
To describe the technical solutions in the embodiments of the present invention more clearly, make required in being described below to embodiment Attached drawing is briefly described, it should be apparent that, drawings in the following description are only some embodiments of the invention, for For those skilled in the art, without creative efforts, it can also be obtained according to these attached drawings other attached Figure.
Fig. 1 is the flow chart for the first gravity sensor register method that the embodiment of the present invention one provides.
Fig. 2 is the flow chart of second of gravity sensor register method provided by Embodiment 2 of the present invention.
Fig. 3 is the schematic diagram of a scenario of second of gravity sensor register method provided by Embodiment 2 of the present invention.
Fig. 4 is a kind of structural schematic diagram for gravity sensor register device that the embodiment of the present invention three provides.
Fig. 5 is a kind of structural schematic diagram for mobile terminal that the embodiment of the present invention four provides.
Specific embodiment
Following will be combined with the drawings in the embodiments of the present invention, and technical solution in the embodiment of the present invention carries out clear, complete Site preparation description, it is clear that described embodiments are only a part of the embodiments of the present invention, instead of all the embodiments.It is based on Embodiment in the present invention, those skilled in the art's every other implementation obtained without creative efforts Example, shall fall within the protection scope of the present invention.
Term " first ", " second ", " third " and " the 4th " in the present invention etc. be for distinguishing different objects, rather than It is used to describe a particular order.In addition, term " includes " and " having " and their any deformations, it is intended that cover non-exclusive Include.Such as contain a series of steps or units process, method, system, product or equipment be not limited to it is listed Step or unit, but optionally further comprising the step of not listing or unit, or optionally further comprising for these processes, side The intrinsic other step or units of method, product or equipment.
Referenced herein " embodiment " is it is meant that a particular feature, structure, or characteristic described can wrap in conjunction with the embodiments Containing at least one embodiment of the present invention.Each position in the description occur the phrase might not each mean it is identical Embodiment, nor the independent or alternative embodiment with other embodiments mutual exclusion.Those skilled in the art explicitly and Implicitly understand, embodiment described herein can be combined with other embodiments.
The executing subject of gravity sensor register method provided in an embodiment of the present invention, can provide for the embodiment of the present invention Gravity sensor register device, or be integrated with the terminal of the gravity sensor register device, the gravity sensor note List device can be realized by the way of hardware or software;Terminal described in the embodiment of the present invention can be to be passed with gravity Smart phone (such as Android phone, Windows Phone mobile phone), tablet computer, palm PC, the notebook electricity of sensor The mobile devices such as brain, mobile internet device (MID, Mobile Internet Devices) or wearable device, above-mentioned terminal It is only citing, and it is non exhaustive, including but not limited to above-mentioned terminal.
The embodiment of the present invention provides a kind of gravity sensor register method, device and mobile terminal.It will carry out respectively below It is described in detail.
Embodiment one,
The present embodiment will be described from the angle of gravity sensor register device, and the gravity sensor register device is specific It can be integrated in the form of software or hardware in the terminal, which can be smart phone, plate with gravity sensor Apparatus such as computer.
Fig. 1 is please referred to, Fig. 1 is the flow chart of the first gravity sensor register method provided in an embodiment of the present invention.It should Method is used to control the registration to gravity sensor, and specific steps include: the ambient light intensity for obtaining terminal current environment; Judge whether ambient light intensity is less than default ambient light intensity;If ambient light intensity is less than default ambient light intensity, then end is obtained The distance between end and shelter;Judge whether distance is less than pre-determined distance threshold value;Such as less than pre-determined distance threshold value then forbids answering With registration gravity sensor.
Each step of the gravity sensor register method of the embodiment of the present invention is described in detail below.
101, the ambient light intensity of terminal current environment is obtained.
During using the terminals such as mobile phone, tablet computer, falling for terminal is touched due to being difficult to avoid that, terminal is answered With needing routinely to register gravity sensor, event is fallen with detection.Gravity sensor is routinely registered in this application Behavior will greatly improve power consumption of terminal.
It is generally not present known to analysis when terminal is in relatively closed space (such as pocket, knapsack in) after study The risk fallen should forbid at this time using registration gravity sensor;And when terminal is placed on the more open space such as tables and chairs When, it is easy to be fallen on the ground, should allow at this time using registration gravity sensor.Therefore choosing can be had according to the environment locating for terminal That selects allows using registration gravity sensor, to reduce power consumption of terminal.
It is apparent from through analysis, confined space is compared with open space, and confined space light is weaker.It therefore can be according to terminal The environmental light intensity of local environment is weak tentatively to judge that terminal is in confined space or open space.Specifically, light can be passed through Line sensor detects the ambient light intensity of terminal local environment.
102, judge whether the ambient light intensity is less than default ambient light intensity.
In general, the ambient light intensity in the closed space such as pocket, knapsack is close to 0, and because pocket etc. has opening, Therefore default ambient light intensity can be set according to the actual situation, be not especially limited herein.
Specifically, terminal judges whether the ambient light intensity is less than default ambient light intensity, such as not less than default environment light Intensity is then transferred to step 104;Such as less than default ambient light intensity, then be transferred to step 103.
103, such as ambient light intensity is less than default ambient light intensity, then obtains the distance between the terminal and shelter; Judge whether the distance is less than pre-determined distance threshold value;Such as less than pre-determined distance threshold value is then forbidden using registration gravity sensor.
Although the confined spaces such as pocket, suitcase have the characteristics that environment light is weaker, cannot light with environment light it is weaker this Feature assert that terminal is in pocket, the such confined space of suitcase.Terminal is such as placed on small black room, or is placed at dark Terminal on desk, the environment light of local environment are all weaker.Through further analysis shows that when terminal be located at pocket, It when the confined spaces such as suitcase, can be contacted with shelters such as pockets, therefore can be by obtaining the distance between terminal and shelter To judge whether terminal is to be located in the particular encapsulateds spaces such as pocket.
Due to, when terminal is in the particular encapsulateds spaces such as pocket, between the terminal theoretically measured and barrier away from From being 0 centimetre, therefore pre-determined distance can be can be set to 0 centimetre, while considering that 1 can also be set to if error Centimetre, 2 centimetres, 3 centimetres, can specifically be arranged according to the actual situation, be not especially limited herein.When the distance that terminal detects Less than pre-determined distance threshold value, illustrate that terminal is in the particular encapsulateds spaces such as pocket, therefore should forbid using registration gravity sensor, To reduce power consumption of terminal.
104, such as ambient light intensity is not less than default ambient light intensity, then obtains the terminal and carry the object of the terminal Contact area between surface;Judge whether the contact area meets preset condition;Such as meet preset condition, then allows using note Volume gravity sensor;It is such as unsatisfactory for preset condition, then is forbidden using registration gravity sensor.
When ambient light intensity is not less than default ambient light intensity, illustrate that terminal is located in open space.If terminal quilt It is placed on desk, when entire terminal is all placed on the table, it is generally not present the risk fallen;And when terminal only has part It is placed on desktop, when another part is in vacant state, a possible touching will be such that terminal falls.For the situation, can obtain Take the contact area between terminal and the body surface for carrying the terminal, by judge contact area whether meet preset condition come Decide whether to allow using registration gravity sensor.
Wherein, the preset condition is for determining whether terminal is in labile state.Preferably, it can be determined that the contact area Whether the terminal cross-sectional area is equal to.Wherein, cross section is perpendicular to the axial cross sectional shape of beam, for example, mobile phone Cross section may be considered mobile phone bottom surface.If being not equal to the cross-sectional area, illustrate that terminal is in the hanging unstable shape in part State, i.e. determination meet preset condition;If being equal to the cross-sectional area, illustrates that terminal is entirely placed on other objects, be in Relatively steady state, i.e. determination are unsatisfactory for preset condition.
The gravity sensor register method of the embodiment of the present invention is less than default ring in the ambient light intensity of terminal local environment Border luminous intensity, and in the case where being less than pre-determined distance threshold value with the distance between shelter, it is close to judge that it is in knapsack, pocket etc. Space is closed, to stop registering gravity sensor, reduces power consumption of terminal.
Embodiment two,
The present embodiment will on the basis of example 1 be described further gravity sensor register method of the present invention.
The present embodiment will be described from the angle of gravity sensor register device, and the gravity sensor register device is specific It can be integrated in the form of software or hardware in the terminal, which can be smart phone, plate with gravity sensor Apparatus such as computer.
Referring to figure 2., Fig. 2 is the flow chart of second of gravity sensor register method provided in an embodiment of the present invention.Under Each step in face of the gravity sensor register method of the embodiment of the present invention is described in detail.
201, the ambient light intensity of terminal current environment is obtained.
During using the terminals such as mobile phone, tablet computer, falling for terminal is touched due to being difficult to avoid that, terminal is answered With needing routinely to register gravity sensor, event is fallen with detection.Gravity sensor is routinely registered in this application Behavior will greatly improve power consumption of terminal.
It is generally not present known to analysis when terminal is in relatively closed space (such as pocket, knapsack in) after study The risk fallen should forbid at this time using registration gravity sensor;And when terminal is placed on the more open space such as tables and chairs When, it is easy to be fallen on the ground, should allow at this time using registration gravity sensor.Therefore choosing can be had according to the environment locating for terminal That selects allows using registration gravity sensor, to reduce power consumption of terminal.
It is apparent from through analysis, confined space is compared with open space, and confined space light is weaker.It therefore can be according to terminal The environmental light intensity of local environment is weak tentatively to judge that terminal is in confined space or open space.Specifically, light can be passed through Line sensor detects the ambient light intensity of terminal local environment.
202, judge whether the ambient light intensity is less than default ambient light intensity.
In general, the ambient light intensity in the closed space such as pocket, knapsack is close to 0, and because pocket etc. has opening, Therefore default ambient light intensity can be set according to the actual situation, be not especially limited herein.
Specifically, terminal judges whether the ambient light intensity is less than default ambient light intensity, such as not less than default environment light Intensity is then transferred to step 203;Such as less than default ambient light intensity, then be transferred to step 205.
203, such as ambient light intensity is not less than default ambient light intensity, then obtains the terminal and carry the object of the terminal Contact area between surface.
When ambient light intensity is not less than default ambient light intensity, illustrate that terminal is located in open space.If terminal quilt It is placed on desk, when entire terminal is all placed on the table, it is generally not present the risk fallen;And when terminal only has part It is placed on desktop, when another part is in vacant state, a possible touching will be such that terminal falls.For the situation, can obtain The contact area between terminal and the body surface for carrying the terminal is taken to decide whether to allow using registration gravity sensor.
Referring to figure 3., mobile phone is placed on chair upward, and mobile phone bottom surface is contacted with seat.Wherein at the top of mobile phone 31 are located on seat, and bottom 32 is exposed outside chair, the area i.e. hand that mobile phone bottom surface is touched close to top 31 and seat at this time Contact area between machine and chair seat.
204, judge whether the contact area meets preset condition.
Wherein, the preset condition is for determining whether terminal is in labile state.Preferably, it can be determined that the contact area Whether the terminal cross-sectional area is equal to.Wherein, cross section is perpendicular to the axial cross sectional shape of beam, as shown in figure 3, terminal is horizontal Sectional area, that is, mobile phone base area.If being not equal to the cross-sectional area, illustrate that terminal is in the hanging labile state in part, I.e. determination meets preset condition;If being equal to the cross-sectional area, illustrate that terminal is entirely placed on other objects, in opposite Stable state, i.e. determination are unsatisfactory for preset condition.
By taking Fig. 3 as an example, mobile phone cross section is mobile phone bottom surface, and size is 12.18 centimetres * 6.85 centimetres, and mobile phone Contact surface with chair is that the part through top 31 is leaned in bottom surface, and contact area is 10 centimetres * 6.85 centimetres, it is clear that contact area is small In mobile phone base area, therefore it is unsatisfactory for preset condition.
205, such as ambient light intensity is less than default ambient light intensity, then obtains the distance between the terminal and shelter.
Although the confined spaces such as pocket, suitcase have the characteristics that environment light is weaker, cannot light with environment light it is weaker this Feature assert that terminal is in pocket, the such confined space of suitcase.Terminal is such as placed on small black room, or is placed at dark Terminal on desk, the environment light of local environment are all weaker.Through further analysis shows that when terminal be located at pocket, It when the confined spaces such as suitcase, can be contacted with shelters such as pockets, therefore can be by obtaining the distance between terminal and shelter To judge whether terminal is to be located in the particular encapsulateds spaces such as pocket.
206, when distance is less than pre-determined distance threshold value, judge whether the terminal is in vibrating state.
Due to, when terminal is in the particular encapsulateds spaces such as pocket, between the terminal theoretically measured and barrier away from From being 0 centimetre, therefore pre-determined distance can be can be set to 0 centimetre, while considering that 1 can also be set to if error Centimetre, 2 centimetres, 3 centimetres, can specifically be arranged according to the actual situation, be not especially limited herein.
Although by judging to ambient light intensity and with the distance between barrier, it may be said that bright terminal is in clothing The closed space such as pocket, knapsack, the case where being in confined space edge there is also terminal, although terminal local environment at this time Environment light is weaker, once but terminal there is phone to squeeze into shake, will fall.Therefore can increase to whether terminal is in The judgement of vibrating state, to improve the accuracy of application registration gravity sensor.
Specifically, since mobile phone vibration is usually what motor operations generated, it can be by judging whether motor is being transported Row is to judge whether mobile phone generates vibration.
207, such as the terminal is in vibrating state or contact area meets preset condition, then allows to pass using registration gravity Sensor.
Since terminal is in vibrating state, the terminal positioned at confined space edge may be because vibration and fall, therefore answer Allow using registration gravity sensor, to be detected to the event of falling.
Similarly, since contact surface meets preset condition, illustrate that terminal is in the labile states such as hanging, as described in Figure 3, hand 31 are placed on seat at the top of machine, and bottom 32 is in vacant state, have the risk fallen, therefore should allow using registration gravity Sensor, to be detected to the event of falling.
Specifically, the process of application registration gravity sensor is as follows: obtaining the mark for calling the application of the gravity sensor; The corresponding sensor calling interface of the mark is set;The sensor calling interface is written to the interface list of the gravity sensor.
Preferably, after terminal allows using registration gravity sensor, warning note can also be sent to user, prompts to use Family terminal has the risk fallen.Specifically, jingle bell prompt can be carried out, bright screen prompt etc..
208, such as terminal is not at vibrating state or contact area is unsatisfactory for preset condition, then forbids using registration weight Force snesor.
Since terminal is not at vibrating state, will not fall terminal is located at the edge of enclosed environment.Similarly, Since contact surface is unsatisfactory for preset condition, illustrate that terminal is stably placed on barrier, without the risk fallen, therefore all Do not allow using registration gravity sensor.The power consumption of terminal can be reduced in this way.
On the basis of first embodiment, the gravity sensor register method of the embodiment of the present invention is further in terminal Whether allow when the case where confined spaces edge such as pocket, knapsack and terminal are in part vacant state using registration gravity The case where sensor, is analyzed, thus selectively Register Sensor, to improve the standard of gravity sensor registration True property, and further reduced power consumption of terminal.
Embodiment three,
In order to better implement above method, the embodiment of the present invention also provides a kind of gravity sensor register device, this is heavy Force snesor register device can integrate in the terminal, which specifically can be the equipment such as smart phone, tablet computer.Such as figure Shown in 4, which includes the first acquisition module 401, the acquisition module of first judgment module 402, second 403, the second judgment module 404, the first disabled module 405, area obtain module 406, area judgment module 407, allow module 408 and second disabled module 409.It is described in detail below:
First obtains module 401, for obtaining the ambient light intensity of terminal current environment;
First judgment module 402, for judging whether the ambient light intensity is less than default ambient light intensity;
Second obtains module 403, for obtaining the terminal and hiding when the ambient light intensity is less than default ambient light intensity The distance between block material;
Second judgment module 404, for judging whether the distance is less than pre-determined distance threshold value;
First disabled module 405, for when being less than pre-determined distance threshold value, forbidding using registration gravity sensor;
Area obtains module 406, for when the ambient light intensity is not less than default ambient light intensity, obtain the terminal with Carry the contact area between the body surface of the terminal;
Area judgment module 407, for judging whether the contact area meets preset condition;
Allow module 408, for when meeting preset condition, allowing using registration gravity sensor;
Second disabled module 409, for when being unsatisfactory for preset condition, forbidding using registration gravity sensor.
Further, the first disabled module 405 includes the first judging submodule, allows submodule and forbid submodule, is had Body is described as follows:
First judging submodule, for judging whether the terminal is in vibrating state;
Allow submodule, for when the terminal is in vibrating state, allowing using registration gravity sensor;
Forbid submodule, for when the terminal is not at vibrating state, forbidding using registration gravity sensor.
Further, area judgment module 407 includes second judgment submodule, the first determining submodule and the second determining son Module is described in detail below:
Second judgment submodule, for judging whether the contact area is equal to the terminal cross-sectional area;
First determines submodule, for when being not equal to the cross-sectional area, determination to meet preset condition;
Second determines submodule, for when being equal to the cross-sectional area, determination to be unsatisfactory for preset condition.
The gravity sensor register device of the embodiment of the present invention is less than default ring in the ambient light intensity of terminal local environment Border luminous intensity, and in the case where being less than pre-determined distance threshold value with the distance between shelter, it is close to judge that it is in knapsack, pocket etc. Space is closed, to stop registering gravity sensor, reduces power consumption of terminal.
Example IV,
Attached drawing 5 is please referred to, Fig. 5 is a kind of structural schematic diagram of mobile terminal provided in an embodiment of the present invention.The movement is whole End 50 includes at least a processor 501, such as central processing unit (CPU, CentralProcessing Unit), at least one Network interface 502, user interface 503, memory 504 and at least one communication bus 505.
Wherein, communication bus 505 waits the connection communication between components for realizing processor 501, memory 504.Network Interface 502 such as can be used for connecting physical network card and physical exchange for realizing the connection communication between physical host and network The equipment such as machine;User interface 503 may include display screen, keyboard, while user interface 503 can be wireless interface, can also be with For wireline interface;Memory 504 can be high-speed memory, be also possible to non-labile memory.
In some embodiments, memory 504 further includes operating system and application module.Operating system contains various System program, for realizing various basic businesses and the hardware based business of processing;Application module includes various application programs, For realizing various applied business.Specifically, memory 504 stores batch processing code, device 501 for processing executes following behaviour Make: obtaining the ambient light intensity of terminal current environment;Judge whether the ambient light intensity is less than default ambient light intensity;? When the ambient light intensity is less than default ambient light intensity, the distance between the terminal and shelter are obtained;Whether judge the distance Less than pre-determined distance threshold value;When being less than pre-determined distance threshold value, forbid using registration gravity sensor.
Further, processor 501 is also used to judge whether the terminal is in vibrating state;Vibration shape is in the terminal When state, allow using registration gravity sensor;When the terminal is not at vibrating state, forbid using registration gravity sensor.
Further, processor 501 is also used to obtain the end when the ambient light intensity is not less than default ambient light intensity Hold and carry the contact area between the body surface of the terminal;Judge whether the contact area meets preset condition;Meeting When preset condition, allow using registration gravity sensor;When being unsatisfactory for preset condition, forbid using registration gravity sensor.
Further, processor 501 is also used to judge whether the contact area is equal to the terminal cross-sectional area;It is being not equal to Determination meets preset condition when the cross-sectional area;When being equal to the cross-sectional area, determination is unsatisfactory for preset condition.
Further, processor 501 is also used to obtain the mark for calling the application of the gravity sensor;The mark pair is set The sensor calling interface answered;The sensor calling interface is written to the interface list of the gravity sensor.
The mobile terminal of the embodiment of the present invention is less than in the ambient light intensity of its local environment presets ambient light intensity, and with In the case that the distance between shelter is less than pre-determined distance threshold value, judge that it is in the confined spaces such as knapsack, pocket, to stop Gravity sensor is only registered, power consumption of terminal is reduced.
When it is implemented, the above modules can be used as independent entity to realize, any combination can also be carried out, is made It is realized for same or several entities, the specific implementation of the above modules can be found in the embodiment of the method for front, herein not It repeats again.
It should be noted that those of ordinary skill in the art will appreciate that whole in the various methods of above-described embodiment or Part steps are relevant hardware can be instructed to complete by program, which can store in computer-readable storage medium It in matter, is such as stored in the memory of terminal, and is executed by least one processor in the terminal, can be wrapped in the process of implementation Include the process of the embodiment such as information issuing method.Wherein, storage medium may include: read-only memory (ROM, Read Only Memory), random access memory (RAM, Random Access Memory), disk or CD etc..
A kind of gravity sensor register method provided in an embodiment of the present invention and device are described in detail above, Each functional module can integrate in a processing chip, is also possible to modules and physically exists alone, can also two or More than two modules are integrated in a module.Above-mentioned integrated module both can take the form of hardware realization, can also adopt It is realized with the form of software function module.Specific case used herein explains the principle of the present invention and embodiment It states, the above description of the embodiment is only used to help understand the method for the present invention and its core ideas;Meanwhile for this field Technical staff, according to the thought of the present invention, there will be changes in the specific implementation manner and application range, in conclusion The contents of this specification are not to be construed as limiting the invention.

Claims (9)

1. a kind of gravity sensor register method characterized by comprising
Obtain the ambient light intensity of terminal current environment;
Judge whether the ambient light intensity is less than default ambient light intensity;
Such as less than default ambient light intensity, then obtain the distance between the terminal and shelter;
Judge whether the distance is less than pre-determined distance threshold value;
Such as less than pre-determined distance threshold value, then terminal is in confined space, judges whether the terminal is in vibrating state;
If the terminal is in vibrating state, terminal, which exists, falls risk, then terminal applies is allowed routinely to register gravity biography Sensor falls event with detection;
If the terminal is not at vibrating state, terminal then forbids terminal applies to register gravity sensor there is no risk is fallen.
2. gravity sensor register method according to claim 1, which is characterized in that the method also includes:
If the ambient light intensity is not less than default ambient light intensity, then obtains the terminal and carry the object table of the terminal Contact area between face;
Judge whether the contact area meets preset condition;
Such as meet preset condition, then allows using registration gravity sensor;
It is such as unsatisfactory for preset condition, then is forbidden using registration gravity sensor.
3. gravity sensor register method according to claim 2, which is characterized in that described to judge that the contact area is No the step of meeting preset condition, specifically includes:
Judge whether the contact area is equal to the terminal cross-sectional area;
Such as it is not equal to the cross-sectional area, it is determined that meet preset condition;
Such as it is equal to the cross-sectional area, it is determined that be unsatisfactory for preset condition.
4. gravity sensor register method according to claim 2, which is characterized in that described to allow to pass using registration gravity Sensor step specifically includes:
Obtain the mark for calling the application of the gravity sensor;
The corresponding sensor calling interface of the mark is set;
The sensor calling interface is written to the interface list of the gravity sensor.
5. a kind of gravity sensor register device characterized by comprising
First obtains module, for obtaining the ambient light intensity of terminal current environment;
First judgment module, for judging whether the ambient light intensity is less than default ambient light intensity;
Second obtains module, for obtaining the distance between the terminal and shelter when being less than default ambient light intensity;
Second judgment module, for judging whether the distance is less than pre-determined distance threshold value;
First disabled module, for when being less than pre-determined distance threshold value, then terminal to be in confined space, judges that the terminal is It is no to be in vibrating state;If the terminal is in vibrating state, terminal, which exists, falls risk, then allows terminal applies routinely Gravity sensor is registered, event is fallen with detection;If the terminal is not at vibrating state, terminal is there is no risk is fallen, then Terminal applies are forbidden to register gravity sensor.
6. gravity sensor register device according to claim 5, which is characterized in that described device further include:
Area obtains module, for obtaining the terminal and holding when the ambient light intensity is not less than default ambient light intensity Carry the contact area between the body surface of the terminal;
Area judgment module, for judging whether the contact area meets preset condition;
Allow module, for when meeting preset condition, allowing using registration gravity sensor;
Second disabled module, for when being unsatisfactory for preset condition, forbidding using registration gravity sensor.
7. gravity sensor register device according to claim 6, which is characterized in that the area judgment module includes:
Second judgment submodule, for judging whether the contact area is equal to the terminal cross-sectional area;
First determines submodule, for when being not equal to the cross-sectional area, determination to meet preset condition;
Second determines submodule, for when being equal to the cross-sectional area, determination to be unsatisfactory for preset condition.
8. a kind of mobile terminal, which is characterized in that including gravity sensor, and the gravity connecting with the gravity sensor passes Sensor register device, wherein the gravity sensor register device includes:
First obtains module, for obtaining the ambient light intensity of terminal current environment;
First judgment module, for judging whether the ambient light intensity is less than default ambient light intensity;
Second obtains module, for obtaining the distance between the terminal and shelter when being less than default ambient light intensity;
Second judgment module, for judging whether the distance is less than pre-determined distance threshold value;
First disabled module, for when being less than pre-determined distance threshold value, then terminal to be in confined space, judges that the terminal is It is no to be in vibrating state;If the terminal is in vibrating state, terminal, which exists, falls risk, then allows terminal applies routinely Gravity sensor is registered, event is fallen with detection;If the terminal is not at vibrating state, terminal is there is no risk is fallen, then Terminal applies are forbidden to register gravity sensor.
9. a kind of computer readable storage medium, is stored thereon with computer program, which is characterized in that described program is by processor The step of gravity sensor register method according to any one of claims 1 to 4 is realized when execution.
CN201610806727.8A 2016-09-06 2016-09-06 A kind of gravity sensor register method, device and mobile terminal Expired - Fee Related CN106385493B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201610806727.8A CN106385493B (en) 2016-09-06 2016-09-06 A kind of gravity sensor register method, device and mobile terminal

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201610806727.8A CN106385493B (en) 2016-09-06 2016-09-06 A kind of gravity sensor register method, device and mobile terminal

Publications (2)

Publication Number Publication Date
CN106385493A CN106385493A (en) 2017-02-08
CN106385493B true CN106385493B (en) 2019-08-23

Family

ID=57938098

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201610806727.8A Expired - Fee Related CN106385493B (en) 2016-09-06 2016-09-06 A kind of gravity sensor register method, device and mobile terminal

Country Status (1)

Country Link
CN (1) CN106385493B (en)

Families Citing this family (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108600541B (en) * 2018-04-24 2020-10-16 Oppo广东移动通信有限公司 Fall detection method and related device
EP3614172B1 (en) * 2018-08-23 2021-09-22 Ibeo Automotive Systems GmbH Method and device for optically measuring distances
CN109151198B (en) * 2018-08-27 2020-09-22 惠州Tcl移动通信有限公司 Control method of proximity and light sensor, mobile terminal and storage medium

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104639833A (en) * 2015-01-29 2015-05-20 深圳市金立通信设备有限公司 Method for controlling camera device
CN104980588A (en) * 2015-06-29 2015-10-14 努比亚技术有限公司 Method and apparatus for detecting state of mobile terminal
CN105635473A (en) * 2016-01-10 2016-06-01 上海与德通讯技术有限公司 Mobile terminal and falling protection method of mobile terminal

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US10172562B2 (en) * 2012-05-21 2019-01-08 Lg Electronics Inc. Mobile terminal with health care function and method of controlling the mobile terminal

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104639833A (en) * 2015-01-29 2015-05-20 深圳市金立通信设备有限公司 Method for controlling camera device
CN104980588A (en) * 2015-06-29 2015-10-14 努比亚技术有限公司 Method and apparatus for detecting state of mobile terminal
CN105635473A (en) * 2016-01-10 2016-06-01 上海与德通讯技术有限公司 Mobile terminal and falling protection method of mobile terminal

Also Published As

Publication number Publication date
CN106385493A (en) 2017-02-08

Similar Documents

Publication Publication Date Title
US11429276B2 (en) Method for displaying graphical user interface and mobile terminal
CN103699318B (en) A kind of electronic equipment touch-control response method and device
CN104965580B (en) The methods of exhibiting and device of unread message
CN107402667A (en) Electronic equipment comprising display
CN106385493B (en) A kind of gravity sensor register method, device and mobile terminal
CN104603735B (en) For controlling the electronic equipment and its method of shown touch area
CN108415636A (en) A kind of generation method, mobile terminal and the storage medium of suspension button
CN106569585A (en) Method and terminal of managing application program process
CN108345483A (en) A kind of reminding method of notification message, terminal and computer readable storage medium
CN106331254B (en) A kind of protection processing method and processing device that mobile terminal falls
CN107181858A (en) A kind of method and terminal for showing notification message
CN103092525A (en) Screen capture method for mobile terminal and mobile terminal based on the screen capture method
CN106331253B (en) A kind of terminal processing method, device and processing terminal
CN106529312B (en) A kind of authority control method of mobile terminal, device and mobile terminal
CN106529332B (en) A kind of authority control method of mobile terminal, device and mobile terminal
CN106254626A (en) A kind of incoming display method and terminal
CN106453904A (en) Information reminding method and terminal
CN107682524A (en) A kind of information displaying method and device, terminal and readable storage medium storing program for executing
CN110209331A (en) Information cuing method and terminal
CN108255402A (en) Check the method, terminal and computer readable storage medium of footmark content of announcement
CN107145386A (en) Data migration method, terminal device and computer-readable recording medium
CN103037084A (en) Method and device of displaying contact information in contact list
CN103941976B (en) A kind of information processing method and electronic equipment
CN105677081B (en) A kind of touch control method and terminal device
CN109416615A (en) Handle the method for touch event and the electronic device suitable for this method

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
CB02 Change of applicant information
CB02 Change of applicant information

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

Applicant after: GUANGDONG OPPO MOBILE TELECOMMUNICATIONS Corp.,Ltd.

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

Applicant before: GUANGDONG OPPO MOBILE TELECOMMUNICATIONS Corp.,Ltd.

GR01 Patent grant
GR01 Patent grant
CF01 Termination of patent right due to non-payment of annual fee
CF01 Termination of patent right due to non-payment of annual fee

Granted publication date: 20190823