CN106817496A - A kind of breath light based on mobile terminal opens and closes control method and mobile terminal - Google Patents
A kind of breath light based on mobile terminal opens and closes control method and mobile terminal Download PDFInfo
- Publication number
- CN106817496A CN106817496A CN201710108642.7A CN201710108642A CN106817496A CN 106817496 A CN106817496 A CN 106817496A CN 201710108642 A CN201710108642 A CN 201710108642A CN 106817496 A CN106817496 A CN 106817496A
- Authority
- CN
- China
- Prior art keywords
- mobile terminal
- breath light
- display screen
- state
- reference point
- 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.)
- Pending
Links
Classifications
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04M—TELEPHONIC COMMUNICATION
- H04M1/00—Substation equipment, e.g. for use by subscribers
- H04M1/72—Mobile telephones; Cordless telephones, i.e. devices for establishing wireless links to base stations without route selection
- H04M1/724—User interfaces specially adapted for cordless or mobile telephones
- H04M1/72448—User interfaces specially adapted for cordless or mobile telephones with means for adapting the functionality of the device according to specific conditions
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04M—TELEPHONIC COMMUNICATION
- H04M1/00—Substation equipment, e.g. for use by subscribers
- H04M1/72—Mobile telephones; Cordless telephones, i.e. devices for establishing wireless links to base stations without route selection
- H04M1/724—User interfaces specially adapted for cordless or mobile telephones
- H04M1/72448—User interfaces specially adapted for cordless or mobile telephones with means for adapting the functionality of the device according to specific conditions
- H04M1/72454—User 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
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04M—TELEPHONIC COMMUNICATION
- H04M1/00—Substation equipment, e.g. for use by subscribers
- H04M1/72—Mobile telephones; Cordless telephones, i.e. devices for establishing wireless links to base stations without route selection
- H04M1/724—User interfaces specially adapted for cordless or mobile telephones
- H04M1/72448—User interfaces specially adapted for cordless or mobile telephones with means for adapting the functionality of the device according to specific conditions
- H04M1/72463—User interfaces specially adapted for cordless or mobile telephones with means for adapting the functionality of the device according to specific conditions to restrict the functionality of the device
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04M—TELEPHONIC COMMUNICATION
- H04M2250/00—Details of telephonic subscriber devices
- H04M2250/12—Details of telephonic subscriber devices including a sensor for measuring a physical value, e.g. temperature or motion
Abstract
Control method and mobile terminal are opened and closed the invention discloses a kind of breath light based on mobile terminal, wherein, methods described includes:Detection mobile terminal current state;Judge the inactive state that whether mobile terminal is placed down in display screen and breath light is opened, or whether be in the state that display screen is placed upward and breath light is closed;When the inactive state that display screen is placed down and breath light is opened, then breath light is closed;When the state that display screen is placed upward and breath light is closed, then breath light is opened.The method that the present invention is provided, make mobile terminal can intelligent decision mobile terminal whether need to use breath light at current time, and close to save electricity in time when that need not use;And when needing to use, open in time, to avoid the unprocessed informations such as short message or Application Hints from being ignored, breath light lasting flicker before not reading SMS message or Application Hints is not processed in the prior art is solved, and the problem of electricity waste is caused in the case of unnecessary.
Description
Technical field
Control is opened and closed the present invention relates to technical field of mobile terminals, more particularly to a kind of breath light based on mobile terminal
Method processed and mobile terminal.
Background technology
Breath light is mobile terminal not reading SMS message or during Application Hints, and flicker is pointing out the conventional design of user.
For mobile terminal, user reminding can be categorized as strong notice, such as bright screen, vibration and the tinkle of bells;And weak notice,
Such as breath light.For weak notice, it is mainly used in reminding, rather than notifies.Its characteristic is not read SMS message or applying
Flicker can be continued before prompting is not processed to remind user, just because of this, the advantage is that prompting ability is strong;Also just because of this,
It often in some special circumstances, such as in user's sleep, causes unnecessary electric quantity consumption.
Therefore, prior art has yet to be improved and developed.
The content of the invention
In view of above-mentioned the deficiencies in the prior art, open it is an object of the invention to provide a kind of breath light based on mobile terminal
Close control method and mobile terminal, it is intended to solve in the prior art breath light before not reading SMS message or Application Hints is not processed
Lasting flicker, and the problem of electricity waste is caused in the case of unnecessary.
Technical scheme is as follows:
A kind of breath light based on mobile terminal opens and closes control method, wherein, the breath light based on mobile terminal opens and closes control
Method processed includes:
Step A:Detection mobile terminal current state;
Step B:The static shape that whether mobile terminal is placed down in display screen and breath light is opened is judged according to testing result
State, or whether it is in the state that display screen is placed upward and breath light is closed;
Step C:When the inactive state for judging that mobile terminal is placed down in display screen and breath light is opened, breathing is closed in control
Lamp;
Step D:When the state for judging that mobile terminal is placed upward in display screen and breath light is closed, breath light is opened in control.
In preferred scheme, the described breath light based on mobile terminal opens and closes control method, wherein, it is described based on mobile whole
The breath light at end opens and closes control method also to be included:
Step S:Default one interval time for being used for periodic detection mobile terminal state;
Step A is specially:After default interval time is reached, detect mobile terminal current state and record testing result.
In preferred scheme, the described breath light based on mobile terminal opens and closes control method, wherein, detected in step A and moved
Dynamic terminal current state is specially:Mobile terminal current state is detected by the gravity sensor for being arranged at mobile terminal.
In preferred scheme, the described breath light based on mobile terminal opens and closes control method, wherein, before step S or it
Afterwards, also include before step A:
Step X:If the mobile terminal display screen lower left corner is reference point, and display screen when keeping flat upward reference point lower section be a little first
Initial point, a static coordinate system is set up by origin of the initial point, and carries three-dimensional system of coordinate as dynamic coordinate with mobile terminal
System, the static coordinate system is moved towards with initial point to reference point direction as Z axis positive axis, and with reference point to the display screen lower right corner
Direction is moved towards for X-axis positive axis, then is moved towards as Y-axis positive axis with reference point to the display screen upper left corner.
In preferred scheme, the described breath light based on mobile terminal opens and closes control method, wherein, step S also includes:In advance
If one is used to judge the threshold value whether mobile terminal remains static;
Step A is specifically included:
Step A1:Detected by gravity sensor and refer to point coordinates(X1, Y1, Z1);
Step A2:The coordinate of detected reference point is stored;
Step B is specifically included:
Step B1:The Z in reference point coordinates is detected1During for negative value, judge that mobile terminal display screen is placed down;When being detected
With reference to Z in point coordinates1Be on the occasion of when, judge that mobile terminal display screen is placed upward;
Step B2:Transfer adjacent testing result twice, and calculate the relative coordinate values in testing result twice with reference to point coordinates;
Step B3:Selection calculates X-axis coordinate value, Y-axis coordinate value and maximum absolute value in Z axis coordinate value in relative coordinate values
Person, and its absolute value is compared with default threshold value, if the absolute value more than threshold value, if judge that mobile terminal is in
Nonstatic state, if the absolute value less than threshold value, if judge that mobile terminal remains static;
Step B4:Judge that breath light is in opening or closed mode.
A kind of mobile terminal, including breath light, wherein, the mobile terminal also includes:
The state detection module being connected with the breath light, for detecting mobile terminal current state;
The condition judgment module being connected with the state detection module, for judging whether mobile terminal is according to testing result
The inactive state that display screen is placed down and breath light is opened, if then sending the first signal to breathing lamp control module;Or
It is no to be placed upward in display screen and state that breath light is closed, if then sending secondary signal to breathing lamp control module;
And the breathing lamp control module being connected with the condition judgment module and breath light, for receiving condition adjudgement mould
Breath light is closed after the first signal come transmitted by block, and is opened after the secondary signal come transmitted by condition judgment module is received
Open breath light.
In preferred scheme, described mobile terminal, wherein, the mobile terminal also includes:
Presetting module, the interval time of periodic detection mobile terminal state is used for for presetting one;
The state detection module specifically for:After default interval time is reached, detection mobile terminal current state is simultaneously
Record testing result.
In preferred scheme, described mobile terminal, wherein, the state detection module includes gravity sensor, and passes through
The gravity sensor detects mobile terminal current state.
In preferred scheme, described mobile terminal, wherein, the mobile terminal also includes:
Coordinate system setup module, for setting the mobile terminal display screen lower left corner for reference point, and display screen is joined when keeping flat upward
Examination point lower section is some initial point, and a static coordinate system is set up by origin of the initial point, and carries three-dimensional with mobile terminal
Coordinate system is dynamic coordinate system, and the static coordinate system is moved towards with initial point to reference point direction as Z axis positive axis, and to refer to
Point to display screen bottom right angular direction is X-axis positive axis trend, then is that Y-axis positive axis is moved towards with reference point to the display screen upper left corner.
In preferred scheme, described mobile terminal, wherein, the presetting module is additionally operable to:Default one is used to judge movement
The threshold value whether terminal remains static;
The gravity sensor specifically for:Detection refers to point coordinates(X1, Y1, Z1);
The state detection module also includes:With reference to point coordinates memory block, the coordinate for detected reference point is stored;
The condition judgment module is specifically included:
Display screen is detected with reference to Z in point coordinates towards judging unit for working as1During for negative value, mobile terminal display screen is judged
Place down;The Z in reference point coordinates is detected1Be on the occasion of when, judge that mobile terminal display screen is placed upward;
Relative coordinate values computing unit, for transferring adjacent testing result twice, and calculates reference point seat in testing result twice
Target relative coordinate values;
Inactive state judging unit, X-axis coordinate value, Y-axis coordinate value and Z axis coordinate value in relative coordinate values are calculated for choosing
Middle maximum absolute value person, and its absolute value is compared with default threshold value, if the absolute value more than threshold value, if judge
Mobile terminal be in nonstatic state, if the absolute value less than threshold value, if judge that mobile terminal remains static;
Breath light condition adjudgement unit, for judging that breath light is in opening or closed mode.
Compared with prior art, the breath light based on mobile terminal that the present invention is provided opens and closes control method, due to first
Detection mobile terminal current state simultaneously records testing result;Then judge mobile terminal whether in display screen according to testing result
The inactive state that placement down and breath light are opened, or whether it is in the state that display screen is placed upward and breath light is closed;And
When the inactive state for judging that mobile terminal is placed down in display screen and breath light is opened, breath light is closed in control;And work as and sentence
The dynamic terminal of offset is in the state that display screen is placed upward and breath light is closed, and breath light is opened in control.So that mobile terminal can
Whether intelligent decision mobile terminal needs to use breath light at current time, and closes to save electricity in time when that need not use
Amount;And when needing to use, open in time, to avoid the unprocessed informations such as short message or Application Hints from being ignored, effectively solve
Breath light lasting flicker before do not read SMS message or Application Hints is not processed in the prior art, and in the case of unnecessary
The problem for causing electricity to waste.
Brief description of the drawings
Fig. 1 is the schematic flow sheet of the breath light keying control method preferred embodiment based on mobile terminal in the present invention.
Fig. 2 is the position relationship schematic diagram of mobile terminal and dynamic coordinate system in present pre-ferred embodiments.
Fig. 3 is the functional schematic block diagram of mobile terminal preferred embodiment in the present invention.
Specific embodiment
Control method and mobile terminal are opened and closed the invention provides a kind of breath light based on mobile terminal, to make the present invention
Purpose, technical scheme and effect it is clearer, clear and definite, referring to the drawings and give an actual example to the present invention further specifically
It is bright.It should be appreciated that the specific embodiments described herein are merely illustrative of the present invention, it is not intended to limit the present invention.
As shown in figure 1, opening and closing control method the invention provides a kind of breath light based on mobile terminal, it includes:
S100, detection mobile terminal current state simultaneously record testing result.
Mobile terminal current state includes described in the step:The placement direction of mobile terminal(It is with display screen direction
It is accurate), breath light state(It is turned on and off)And whether be inactive state;Whether described be that inactive state refers within a certain period of time
Whether mobile terminal pose changes.
In present pre-ferred embodiments, the detection of mobile terminal current state is by the gravity that is arranged in mobile terminal
Sensor is carried out.
Gravity sensor belongs to new category sensor technology, and it is made cantilevered shifter using elastic sensing element, with
The energy-stored spring being made of elastic sensing element drives electric contact, completes the conversion from Gravity changer to electric signal.
Can be measured due to the acceleration that gravity causes by gravity sensor, equipment can be calculated with respect to the horizontal plane
Angle of inclination, by analyzing dynamic acceleration, it can be deduced that equipment movement mode, this belongs to prior art.And it is of the invention
In the placing towards being that prior art is not disclosed and is not directed to of mobile terminal is detected by gravity sensor, in order to realize this
Purpose, present invention employs step:
S050, to set the mobile terminal display screen lower left corner be reference point, and display screen when keeping flat upward reference point lower section be a little first
Initial point, a static coordinate system is set up by origin of the initial point, and carries three-dimensional system of coordinate as dynamic coordinate with mobile terminal
System, the static coordinate system is moved towards with initial point to reference point direction as Z axis positive axis, and with reference point to the display screen lower right corner
Direction is moved towards for X-axis positive axis, then is moved towards as Y-axis positive axis with reference point to the display screen upper left corner.
Mobile terminal carries three-dimensional system of coordinate and can use the three-dimensional system of coordinate being installed in the APP of mobile terminal, as
Three-dimensional system of coordinate in figure software etc..
It is front that mobile terminal sets display screen one side, and another side is then the back side, when mobile terminal keeps flat upward, ginseng
The point being located at immediately below examination point on the mobile terminal back side is corresponding points, and the midpoint between reference point and corresponding points is this for initial point
The preferred version of invention.
As shown in Fig. 2 mobile terminal when A represents that display screen keeps flat upward in figure, and a represents that display screen is put down down in figure
Mobile terminal when putting, the mobile terminal display screen lower left corner i.e. reference point when A1 represents that display screen keeps flat upward, a1 represents aobvious
Reference point when display screen keeps flat down.
During specific implementation, triaxial coordinate value can be set by minus 10 to 10, be grade unit with floating number.
Floating number is belonging to the numeral expression of the number of certain particular subset in rational, appoints to approximate representation in a computer
Anticipate certain real number.Specifically, this real number is multiplied by certain radix and (leads in computer by an integer or fixed-point number (i.e. mantissa)
It is often that integral number power 2) is obtained, this method for expressing is similar to the scientific notation that radix is 10.
When mobile terminal display screen keeps flat upward, dynamic coordinate fastens reference point coordinate can be with relative to static coordinate system
For(0,0,9.81).
When mobile terminal display screen keeps flat down, dynamic coordinate fastens reference point coordinate can be with relative to static coordinate system
For(0,0, -9.81).
When mobile terminal is with Y-axis as rotating shaft, when being tilted to the left, the coordinate value in the X-axis positive axis of dynamic coordinate system is negative;
It is tilted to the right then as just.
When mobile terminal is with X-axis as rotating shaft, when being inclined upwardly, the coordinate value in the Y-axis positive axis of dynamic coordinate system is negative;
Downward-sloping is then just.
Certainly, the foundation of three-dimensional system of coordinate can also carry out other corresponding on the basis of the above preferred embodiment
Adjustment or conversion.
Before or after three-dimensional system of coordinate is set up, should also step be carried out as follows:
S000, default one are used to judge the threshold value whether mobile terminal remains static.
In the present invention further preferred embodiment, S000 also includes:Default one is used for periodic detection mobile terminal shape
The interval time of state.
And with the setting of interval time, S100 can further be adjusted to:After default interval time is reached, detection
Mobile terminal current state simultaneously records testing result.
Interval time be disposed to by the state-detection of mobile terminal further adjustment in order to:Automatically carry out and
The detection mode of when property so that the open and close of breath light can in time be controlled after mobile terminal state change, save
User voluntarily adjusts or artificially carries out the trouble of other settings.
The setting of interval time so that the control method is different from real-time detection, is detected also different from manual control;Its phase
Energy is more saved compared with real-time monitoring, and is detected then more convenient simple compared to manual control and can effectively be prevented user from losing
Leakage important information.
During specific implementation, the S100 includes that step is as follows:
S110, by gravity sensor detect refer to point coordinates(X1, Y1, Z1).
Reference point coordinates described herein refers to the absolute coordinate under static coordinate system.
S120, the coordinate of detected reference point is stored.
Can be carried out by dividing a separate storage region in the storage region in mobile terminal with reference to the storage of point coordinates,
Such as in the storage folder mode of mobile terminal zone-setting one, the step is prior art, be will not be repeated here.
After S100, step should be also carried out:
S200, judged according to testing result mobile terminal whether in display screen place down and breath light open static shape
State;Or whether it is in the state that display screen is placed upward and breath light is closed.
S300, when judge mobile terminal be in display screen place down and breath light open inactive state, control close
Breath light.
S400, when judge mobile terminal be in display screen place upward and breath light close state, control open breathing
Lamp.
Wherein, S200 specifically may include:
S210, the Z in reference point coordinates is detected1During for negative value, judge that mobile terminal display screen is placed down;When detecting ginseng
Z in examination point coordinate1Be on the occasion of when, judge that mobile terminal display screen is placed upward.
S220, adjacent testing result twice is transferred, and calculate the relative coordinate values in testing result twice with reference to point coordinates.
S230, selection calculate X-axis coordinate value, Y-axis coordinate value and maximum absolute value in Z axis coordinate value in relative coordinate values
Person, and its absolute value is compared with default threshold value, if the absolute value more than threshold value, if judge mobile terminal in non-
Inactive state, if the absolute value less than threshold value, if judge that mobile terminal remains static.
The sample code of detection can be as follows:
@Override
public void onSensorChanged(SensorEvent event) {
if (event.sensor == null) {
return;
}
if (event.sensor.getType() == Sensor.TYPE_ACCELEROMETER) {
int x = (int) event.values[0];
int y = (int) event.values[1];
int z = (int) event.values[2];
mCalendar = Calendar.getInstance();
long stamp = mCalendar.getTimeInMillis() / 1000l;//
1393844912
textviewX.setText(String.valueOf(x));
textviewY.setText(String.valueOf(y));
textviewZ.setText(String.valueOf(z));
int second = mCalendar.get(Calendar.SECOND);// 53
int px = Math.abs(mX - x);
int py = Math.abs(mY - y);
int pz = Math.abs(mZ - z);
Log.d(TAG, "pX:" + px + " pY:" + py + " pZ:" + pz + " stamp:"
+ stamp + " second:" + second);
int maxvalue = getMaxValue(px, py, pz);
if (maxvalue > 2 && (stamp - lasttimestamp) > 30) {
lasttimestamp = stamp;
Log.d(TAG, " sensor isMoveorchanged....");
TextviewF.setText (" detection mobile phone is in mobile .. ");
}else {
TextviewF.setText (" detection mobile phone is in inactive state .. ");
}
mX = x;
mY = y;
mZ = z;
}
}
S240, judge breath light be in opening or closed mode.
As shown in figure 3, present invention also offers a kind of mobile terminal, it includes:Breath light 400,
The state detection module 100 being connected with the breath light, for detecting mobile terminal current state and recording testing result,
Specifically as described in above-mentioned embodiment of the method;
The condition judgment module 200 being connected with the state detection module, for whether judging mobile terminal according to testing result
Placed down in display screen and inactive state that breath light is opened, if then sending the first signal to breathing lamp control module;
Or whether the state that display screen is placed upward and breath light is closed is in, if then sending secondary signal to breath light controls mould
Block, it is specific as described in above-mentioned embodiment of the method;
And the breathing lamp control module 300 being connected with the condition judgment module and breath light, for sentencing in the state of receiving
Breath light is closed after the first signal come transmitted by disconnected module, and is receiving secondary signal next transmitted by condition judgment module
After open breath light, it is specific as described in above-mentioned embodiment of the method.
Further in preferred embodiment, the mobile terminal also includes the present invention:
Presetting module, the interval time of periodic detection mobile terminal state is used for for presetting one, specific as above-mentioned method is implemented
Example is described;
The state detection module specifically for:After default interval time is reached, detection mobile terminal current state is simultaneously
Record testing result is specific as described in above-mentioned embodiment of the method.
Further in preferred embodiment, the state detection module includes gravity sensor to the present invention, and by described
Gravity sensor detects mobile terminal current state, specific as described in above-mentioned embodiment of the method.
Further in preferred embodiment, the mobile terminal also includes the present invention:
Coordinate system setup module, for setting the mobile terminal display screen lower left corner for reference point, and display screen is joined when keeping flat upward
Examination point lower section is some initial point, and a static coordinate system is set up by origin of the initial point, and carries three-dimensional with mobile terminal
Coordinate system is dynamic coordinate system, and the static coordinate system is moved towards with initial point to reference point direction as Z axis positive axis, and to refer to
Point to display screen bottom right angular direction is X-axis positive axis trend, then is that Y-axis positive axis is moved towards with reference point to the display screen upper left corner,
Specifically as described in above-mentioned embodiment of the method.
Further in preferred embodiment, the presetting module is additionally operable to the present invention:Default one is used to judge mobile terminal
Whether the threshold value for remaining static is specific as described in above-mentioned embodiment of the method;
The gravity sensor specifically for:Detection refers to point coordinates(X1, Y1, Z1), it is specific as described in above-mentioned embodiment of the method;
The state detection module also includes:With reference to point coordinates memory block, the coordinate for detected reference point is stored, tool
Body is as described in above-mentioned embodiment of the method;
The condition judgment module is specifically included:
Display screen is detected with reference to Z in point coordinates towards judging unit for working as1During for negative value, mobile terminal display screen is judged
Place down;The Z in reference point coordinates is detected1Be on the occasion of when, judge that mobile terminal display screen is placed upward, specifically as described above
Described in embodiment of the method;
Relative coordinate values computing unit, for transferring adjacent testing result twice, and calculates reference point seat in testing result twice
Target relative coordinate values, it is specific as described in above-mentioned embodiment of the method;
Inactive state judging unit, X-axis coordinate value, Y-axis coordinate value and Z axis coordinate value in relative coordinate values are calculated for choosing
Middle maximum absolute value person, and its absolute value is compared with default threshold value, if the absolute value more than threshold value, if judge to move
Dynamic terminal is in nonstatic state, if the absolute value less than threshold value, if judge that mobile terminal remains static, specifically as described above
Described in embodiment of the method;
Breath light condition adjudgement unit, it is specific such as above-mentioned method for judging that breath light is in opening or closed mode
Described in embodiment.
It should be appreciated that application of the invention is not limited to above-mentioned citing, and for those of ordinary skills, can
To be improved according to the above description or converted, all these modifications and variations should all belong to the guarantor of appended claims of the present invention
Shield scope.
Claims (10)
1. a kind of breath light based on mobile terminal opens and closes control method, it is characterised in that the breathing based on mobile terminal
Lamp opens and closes control method to be included:
Step A:Detection mobile terminal current state;
Step B:The static shape that whether mobile terminal is placed down in display screen and breath light is opened is judged according to testing result
State, or whether it is in the state that display screen is placed upward and breath light is closed;
Step C:When the inactive state for judging that mobile terminal is placed down in display screen and breath light is opened, breathing is closed in control
Lamp;
Step D:When the state for judging that mobile terminal is placed upward in display screen and breath light is closed, breath light is opened in control.
2. the breath light based on mobile terminal according to claim 1 opens and closes control method, it is characterised in that described to be based on
The breath light of mobile terminal opens and closes control method also to be included:
Step S:Default one interval time for being used for periodic detection mobile terminal state;
Step A is specially:After default interval time is reached, detect mobile terminal current state and record testing result.
3. the breath light based on mobile terminal according to claim 2 opens and closes control method, it is characterised in that in step A
Detection mobile terminal current state is specially:The current shape of mobile terminal is detected by the gravity sensor for being arranged at mobile terminal
State.
4. breath light based on mobile terminal according to claim 3 opens and closes control method, it is characterised in that step S it
It is preceding or afterwards, also include before step A:
Step X:If the mobile terminal display screen lower left corner is reference point, and display screen when keeping flat upward reference point lower section be a little first
Initial point, a static coordinate system is set up by origin of the initial point, and carries three-dimensional system of coordinate as dynamic coordinate with mobile terminal
System, the static coordinate system is moved towards with initial point to reference point direction as Z axis positive axis, and with reference point to the display screen lower right corner
Direction is moved towards for X-axis positive axis, then is moved towards as Y-axis positive axis with reference point to the display screen upper left corner.
5. the breath light based on mobile terminal according to claim 4 opens and closes control method, it is characterised in that step S is also
Including:Default one is used to judge the threshold value whether mobile terminal remains static;
Step A is specifically included:
Step A1:Detected by gravity sensor and refer to point coordinates(X1, Y1, Z1);
Step A2:The coordinate of detected reference point is stored;
Step B is specifically included:
Step B1:The Z in reference point coordinates is detected1During for negative value, judge that mobile terminal display screen is placed down;When being detected
With reference to Z in point coordinates1Be on the occasion of when, judge that mobile terminal display screen is placed upward;
Step B2:Transfer adjacent testing result twice, and calculate the relative coordinate values in testing result twice with reference to point coordinates;
Step B3:Selection calculates X-axis coordinate value, Y-axis coordinate value and maximum absolute value in Z axis coordinate value in relative coordinate values
Person, and its absolute value is compared with default threshold value, if the absolute value more than threshold value, if judge that mobile terminal is in
Nonstatic state, if the absolute value less than threshold value, if judge that mobile terminal remains static;
Step B4:Judge that breath light is in opening or closed mode.
6. a kind of mobile terminal, including breath light, it is characterised in that the mobile terminal also includes:
The state detection module being connected with the breath light, for detecting mobile terminal current state;
The condition judgment module being connected with the state detection module, for judging whether mobile terminal is according to testing result
The inactive state that display screen is placed down and breath light is opened, if then sending the first signal to breathing lamp control module;Or
It is no to be placed upward in display screen and state that breath light is closed, if then sending secondary signal to breathing lamp control module;
And the breathing lamp control module being connected with the condition judgment module and breath light, for receiving condition adjudgement mould
Breath light is closed after the first signal come transmitted by block, and is opened after the secondary signal come transmitted by condition judgment module is received
Open breath light.
7. mobile terminal according to claim 6, it is characterised in that the mobile terminal also includes:
Presetting module, the interval time of periodic detection mobile terminal state is used for for presetting one;
The state detection module specifically for:After default interval time is reached, detection mobile terminal current state is simultaneously
Record testing result.
8. mobile terminal according to claim 7, it is characterised in that the state detection module includes gravity sensor,
And mobile terminal current state is detected by the gravity sensor.
9. mobile terminal according to claim 8, it is characterised in that the mobile terminal also includes:
Coordinate system setup module, for setting the mobile terminal display screen lower left corner for reference point, and display screen is joined when keeping flat upward
Examination point lower section is some initial point, and a static coordinate system is set up by origin of the initial point, and carries three-dimensional with mobile terminal
Coordinate system is dynamic coordinate system, and the static coordinate system is moved towards with initial point to reference point direction as Z axis positive axis, and to refer to
Point to display screen bottom right angular direction is X-axis positive axis trend, then is that Y-axis positive axis is moved towards with reference point to the display screen upper left corner.
10. mobile terminal according to claim 9, it is characterised in that the presetting module is additionally operable to:Default one is used to sentence
The threshold value whether disconnected mobile terminal remains static;
The gravity sensor specifically for:Detection refers to point coordinates(X1, Y1, Z1);
The state detection module also includes:With reference to point coordinates memory block, the coordinate for detected reference point is stored;
The condition judgment module is specifically included:
Display screen is detected with reference to Z in point coordinates towards judging unit for working as1During for negative value, mobile terminal display screen court is judged
Lower placement;The Z in reference point coordinates is detected1Be on the occasion of when, judge that mobile terminal display screen is placed upward;
Relative coordinate values computing unit, for transferring adjacent testing result twice, and calculates reference point seat in testing result twice
Target relative coordinate values;
Inactive state judging unit, X-axis coordinate value, Y-axis coordinate value and Z axis coordinate value in relative coordinate values are calculated for choosing
Middle maximum absolute value person, and its absolute value is compared with default threshold value, if the absolute value more than threshold value, if judge
Mobile terminal be in nonstatic state, if the absolute value less than threshold value, if judge that mobile terminal remains static;
Breath light condition adjudgement unit, for judging that breath light is in opening or closed mode.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201710108642.7A CN106817496A (en) | 2017-02-27 | 2017-02-27 | A kind of breath light based on mobile terminal opens and closes control method and mobile terminal |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201710108642.7A CN106817496A (en) | 2017-02-27 | 2017-02-27 | A kind of breath light based on mobile terminal opens and closes control method and mobile terminal |
Publications (1)
Publication Number | Publication Date |
---|---|
CN106817496A true CN106817496A (en) | 2017-06-09 |
Family
ID=59112077
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201710108642.7A Pending CN106817496A (en) | 2017-02-27 | 2017-02-27 | A kind of breath light based on mobile terminal opens and closes control method and mobile terminal |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN106817496A (en) |
Cited By (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN107613547A (en) * | 2017-09-05 | 2018-01-19 | 深圳支点电子智能科技有限公司 | A kind of mobile terminal reminding method and mobile terminal |
CN113645740A (en) * | 2020-05-11 | 2021-11-12 | 云米互联科技(广东)有限公司 | Residual indicating method and residual indicating structure of breathing lamp of household appliance consumption module |
Citations (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN102520858A (en) * | 2011-12-08 | 2012-06-27 | 深圳市万兴软件有限公司 | Mobile terminal application control method and device |
CN103701988A (en) * | 2013-12-17 | 2014-04-02 | 小米科技有限责任公司 | Message prompt method and device and electronic equipment |
CN104052876A (en) * | 2014-06-18 | 2014-09-17 | 深圳市欧珀通信软件有限公司 | Breathing lamp reminding method applied to mobile terminal and mobile terminal |
CN104601777A (en) * | 2014-12-25 | 2015-05-06 | 孙冬梅 | Mobile phone with information prompting function |
-
2017
- 2017-02-27 CN CN201710108642.7A patent/CN106817496A/en active Pending
Patent Citations (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN102520858A (en) * | 2011-12-08 | 2012-06-27 | 深圳市万兴软件有限公司 | Mobile terminal application control method and device |
CN103701988A (en) * | 2013-12-17 | 2014-04-02 | 小米科技有限责任公司 | Message prompt method and device and electronic equipment |
CN104052876A (en) * | 2014-06-18 | 2014-09-17 | 深圳市欧珀通信软件有限公司 | Breathing lamp reminding method applied to mobile terminal and mobile terminal |
CN104601777A (en) * | 2014-12-25 | 2015-05-06 | 孙冬梅 | Mobile phone with information prompting function |
Cited By (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN107613547A (en) * | 2017-09-05 | 2018-01-19 | 深圳支点电子智能科技有限公司 | A kind of mobile terminal reminding method and mobile terminal |
CN113645740A (en) * | 2020-05-11 | 2021-11-12 | 云米互联科技(广东)有限公司 | Residual indicating method and residual indicating structure of breathing lamp of household appliance consumption module |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN103516004B (en) | A kind of information processing method and device | |
CN103729056A (en) | System and method for controlling electronic equipment by knock | |
CN103581443A (en) | Intelligent terminal automatic awakening method and system based on sensors | |
CN102006356A (en) | Method for detecting state of cell phone pocket by using Android operating system | |
CN106817496A (en) | A kind of breath light based on mobile terminal opens and closes control method and mobile terminal | |
CN107566650A (en) | Solve lock control method and Related product | |
CN106254660A (en) | The awakening method of display screen and device | |
CN106569921B (en) | A kind of metering core clock processing method and processing device of twin-core intelligent electric energy meter | |
CN107315468A (en) | Electricity based reminding method, device, storage medium and terminal | |
CN105225316A (en) | A kind of dormancy of electron key low-power consumption power supply plan and awakening method | |
CN104503565A (en) | Power consumption management method and device for mobile device and mobile device | |
CN107843844A (en) | A kind of method, terminal and computer-readable recording medium for calibrating charge value | |
CN104216501A (en) | Electricity saving method for mobile terminal, electricity saving system for mobile terminal and mobile terminal | |
CN106547204A (en) | A kind of method of intelligent watch and its bright aobvious screen | |
CN106410896A (en) | Method and system for entering power-saving mode during charging of mobile terminal | |
CN104158962B (en) | Mobile terminal display screen control method and its system | |
CN104375929A (en) | Method for processing information and electronic equipment | |
CN106502458A (en) | A kind of touch screen method and terminal | |
CN103024183A (en) | Method and system for awakening mobile phone | |
US20100301798A1 (en) | Method for controlling solar charge device and portable terminal using the same | |
CN103837835A (en) | Method and device for detecting capacity decreasing degree of mobile device battery | |
CN106058971A (en) | Charging protection method and mobile terminal | |
CN1987757A (en) | Regulating method for portable device touch screen sensitivity | |
CN110049537A (en) | A kind of electricity saving method of intelligent wearable device, device, equipment and storage medium | |
CN106205066A (en) | Method, device and the terminal of a kind of detection of soaking |
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 | ||
RJ01 | Rejection of invention patent application after publication |
Application publication date: 20170609 |
|
RJ01 | Rejection of invention patent application after publication |