Summary of the invention
The above-mentioned defect that the present invention is directed to prior art provides a kind of mobile terminal and control method thereof, can identify the application scenario of mobile terminal, based on application scenario, makes mobile terminal enter at once holding state or switch to application state from holding state.
The technical scheme that the present invention solves its technical problem employing is: a kind of control method of mobile terminal is provided, comprises the following steps:
S1, detect in real time the intensity I of the ambient light in mobile terminal front1and/or the distance L in shelter and mobile terminal front1, detect in real time the intensity I of the ambient light at the mobile terminal back side2and/or the distance L at shelter and the mobile terminal back side2;
S2, based on I1and/or L1, I2and/or L2testing result determine the residing application scenario of mobile terminal;
S3, based on the residing application scenario of mobile terminal, make mobile terminal be switched to use state or put out screen holding state.
Preferably, step S2 comprises following sub-step:
S20: preset for respectively with I1and/or L1, I2and/or L2first to fourth threshold value comparing;
S21, respectively by I1and/or L1, I2and/or L2compare with corresponding threshold value separately;
S22, based on I1and/or L1, I2and/or L2determine the residing application scenario of mobile terminal with the comparative result of corresponding threshold value separately.
Preferably, when based on I1, L1, I2and L2while determining the residing application scenario of mobile terminal with the comparative result of corresponding threshold value separately, sub-step S21 comprises following secondary sub-step:
S221, work as L1be greater than Second Threshold, and L2while being greater than the 4th threshold value, mobile terminal is in the first application scenario;
S222, work as I1be less than or equal to first threshold, L1be less than or equal to Second Threshold and L2while being greater than the 4th threshold value, mobile terminal is in the second application scenario;
S223, work as L1be greater than Second Threshold, I2be less than or equal to the 3rd threshold value and L2while being less than or equal to the 4th threshold value, mobile terminal is in the 3rd application scenario;
S224, work as I1be less than or equal to first threshold, L1be less than or equal to Second Threshold, I2be less than or equal to the 3rd threshold value and L2while being less than or equal to the 4th threshold value, mobile terminal is in the 4th application scenario.
Preferably, step S3 comprises following sub-step:
If S31 mobile terminal is in the first application scenario, mobile terminal is switched to use state, and further judge whether the mobile terminal withdraw from service time is more than or equal to very first time interval, if mobile terminal is switched to and puts out screen holding state, maintain if not the current state of mobile terminal;
If S32 mobile terminal, in the second application scenario, is switched to mobile terminal and puts out screen holding state;
If whether S33 mobile terminal in the 3rd application scenario, further judges mobile terminal current in use state, if maintain the current state of mobile terminal, mobile terminal is switched to and puts out screen holding state if not;
If S34 mobile terminal, in the 4th application scenario, is switched to mobile terminal and puts out screen holding state.
Preferably, step S31 comprises following sub-step:
If S311 mobile terminal, in the first application scenario, is switched to mobile terminal use state;
Whether whether S312, judgement mobile terminal in described very first time interval receive operational order or exist the application program of non-running background in operation, if maintain the current state of mobile terminal, mobile terminal is switched to and puts out screen holding state if not.
A kind of mobile terminal is provided, comprises:
Preposition light sensor and/or range sensor, it is arranged at screen one side of mobile terminal, for detecting in real time the intensity I of the ambient light in mobile terminal front1and/or the distance L in shelter and mobile terminal front1;
Rearmounted light sensor and/or range sensor, it is arranged at the back side of mobile terminal screen one side, for detecting in real time the intensity I of the ambient light at the mobile terminal back side2and/or the distance L at shelter and the mobile terminal back side2;
Application scenario determining unit, it is connected with light sensor and/or the range sensor of described preposition light sensor and/or range sensor, described postposition respectively, for based on I1and/or L1, I2and/or L2testing result determine the residing application scenario of mobile terminal;
State switch unit, it is connected with described application scenario determining unit, for based on the residing application scenario of mobile terminal, makes mobile terminal be switched to use state or puts out screen holding state.
Preferably, described preposition light sensor and/or range sensor are also for by I1compare with first threshold, and/or by L1compare with Second Threshold; The light sensor of described postposition and/or range sensor are also for by I2compare with the 3rd threshold value, and/or by L2compare with the 4th threshold value;
Described application scenario determining unit is according to I1and/or L1, I2and/or L2determine the residing application scenario of mobile terminal with the comparative result of corresponding threshold value separately.
Preferably, when described mobile terminal comprises preposition light sensor and range sensor and rearmounted light sensor and range sensor, if L1be greater than first threshold, and L2be greater than the 4th threshold value, mobile terminal is in the first application scenario; If I1be less than or equal to first threshold, L1be less than or equal to Second Threshold and L2be greater than the 4th threshold value, mobile terminal is in the second application scenario; If L1be greater than Second Threshold, I2be less than or equal to the 3rd threshold value and L2be less than or equal to the 4th threshold value, mobile terminal is in the 3rd application scenario; If I1be less than or equal to first threshold, L1be less than or equal to Second Threshold, I2be less than or equal to the 3rd threshold value and L2be less than or equal to the 4th threshold value, mobile terminal is in the 4th application scenario.
Preferably, when mobile terminal is during in the first application scenario, described state switch unit is switched to use state by mobile terminal, and further judge whether the mobile terminal withdraw from service time is more than or equal to very first time interval, if mobile terminal is switched to and puts out screen holding state, maintain if not the current state of mobile terminal; When mobile terminal is during in the second application scenario, described state switch unit is switched to mobile terminal to put out screen holding state; When mobile terminal is during in the 3rd application scenario, described state switch unit further judges that mobile terminal is current whether in use state, if maintain the current state of mobile terminal, mobile terminal is switched to and puts out screen holding state if not; When mobile terminal is during in the 4th application scenario, described state switch unit is switched to mobile terminal to put out screen holding state.
Preferably, described mobile terminal comprises above the back side that is arranged at mobile terminal screen one side and rearmounted light sensor and/or the range sensor of below.
The beneficial effect of mobile terminal of the present invention and control method thereof: by preposition light sensor and/or range sensor are set, rearmounted light sensor and/or range sensor, respectively the light intensity of the front and back of mobile terminal and/or circumstance of occlusion are detected, based on testing result, determine the residing application scenario of mobile terminal, application scenario based on definite is switched to mobile terminal use state or puts out screen holding state, can when not used, mobile terminal not make mobile terminal put out immediately screen standby, without waiting for the automatic stand-by time, at utmost save the power consumption of mobile terminal, in addition, when user picks up when putting out the mobile terminal of screen holding state, mobile terminal can enter use state immediately, without user, carry out button operation, improved the intellectuality of mobile terminal.
Embodiment
Below in conjunction with drawings and Examples the present invention will be further explained explanation.
Inmobile terminal 100 first embodiment of the present invention, referring to Fig. 1,mobile terminal 100 comprises light sensor 121, application scenario determining unit 130 and the state switch unit 140 of preposition light sensor 111, postposition, and application scenario determining unit 130 is connected with preposition light sensor 111, rearmounted light sensor 121 and state switch unit 140 respectively.
Wherein, preposition light sensor 111 is arranged at the front ofmobile terminal 100, and screen one side, as shown in Figure 2, can be arranged at the top of screen, and it is for detecting in real time the intensity I of the ambient light inmobile terminal 100 fronts1, and by the I detecting1with default first threshold comparison, if I1be less than or equal to first threshold, preposition light sensor 111 produces and sends interrupt signal.
Rearmounted light sensor 121 is arranged at the back side ofmobile terminal 100, be the back side ofmobile terminal 100 screens, rearmounted light sensor 121 can be arranged on the top atmobile terminal 100 back sides or below to avoid the middle part ofmobile terminal 100, avoid user to hold the impact ofmobile terminal 100, as shown in Figure 3, rearmounted light sensor 121 can be arranged to the side (being the top atmobile terminal 100 back sides) ofmobile terminal 100 back side cameras.Rearmounted light sensor 121 is for detecting in real time the intensity I of the ambient light atmobile terminal 100 back sides2, and by the I detecting2with the 3rd default threshold value comparison, at I2while being less than or equal to the 3rd threshold value, rearmounted light sensor 121 produces and sends interrupt signal.
Application scenario determining unit 130, for based on I1and I2testing result determine the residing application scenario of mobile terminal.Particularly, the interrupt signal variable that 111 generations of preposition light sensor are set is INT_FRONT, the interrupt signal variable that 121 generations of rearmounted light sensor are set is INT_BACK, if application scenario determining unit 130 receives the interrupt signal that preposition light sensor 111 sends, INT_FRONT is 1, if do not receive the interrupt signal that preposition light sensor 111 sends, INT_FRONT is 0.If application scenario determining unit 130 receives the interrupt signal that rearmounted light sensor 121 sends, INT_BACK is 1, if do not receive the interrupt signal that rearmounted light sensor 121 sends, INT_BACK is 0.The logic state of INT_FRONT and INT_BACK and the corresponding relation of application scenario are as shown in table 1.
Table 1
| Application scenario | INT_FRONT | INT_BACK |
| Thefirst application scenario | 0 | 0 |
| Thesecond application scenario | 1 | 0 |
| The3rd application scenario | 0 | 1 |
| The4th application scenario | 1 | 1 |
In the present embodiment, referring to table 1, work as I1be greater than first threshold, and L2while being greater than the 4th threshold value, application scenario determining unit 130 determines thatmobile terminal 100 is in the first application scenario; Work as I1be less than or equal to first threshold, and I2while being greater than the 3rd threshold value, application scenario determining unit 130 determines thatmobile terminal 100 is in the second application scenario; Work as I1be greater than first threshold, and I2while being less than or equal to Second Threshold, application scenario determining unit 130 determines thatmobile terminal 100 is in the 3rd application scenario; Work as I1be less than or equal to first threshold, and I2while being less than or equal to the 3rd threshold value, application scenario determining unit 130 determines thatmobile terminal 100 is in the 4th application scenario.
Under the first application scenario, preposition light sensor 111 and rearmounted light sensor 121 all produce without interrupt signal, nowmobile terminal 100 is in use state, under use state,mobile terminal 100 receives the operation (for example, user's point touching shields, and function button is triggered) that user carries out, and/or there is the application program (for example, game, video jukebox software, document ocr software etc.) of non-running background to move.
Under the second application scenario, preposition light sensor 111 produces interrupt signal, rearmounted light sensor 121 produces without interrupt signal, now the front ofmobile terminal 100 is blocked, in idle or talking state, for examplemobile terminal 100 face down are positioned over desktop, whenmobile terminal 100 is mobile phone, user makes a phone call by mobile phone, the mobile phone face of being close to the users.
Under the 3rd application scenario, preposition light sensor 111 produces without interrupt signal, rearmounted light sensor 121 produces interrupt signal, now the back side ofmobile terminal 100 thing that is blocked blocks, in idle or use state, for examplemobile terminal 100 faces up and leaves unused in desktop, ormobile terminal 100 faces up and is positioned over the application program (use state) that desktop and user are just just moving non-running background on operatingmobile terminal 100 ormobile terminal 100.
Under the 4th application scenario, preposition light sensor 111 and rearmounted light sensor 121 all produce interrupt signal, and nowmobile terminal 100 front and backs are all blocked, and for example,mobile terminal 100 is placed on Bao Baoli.
State switch unit 140, based on the residing application scenario of the determinedmobile terminal 100 of application scenario determining unit 130, makesmobile terminal 100 be switched to use state or puts out screen holding state.Particularly, whenmobile terminal 100 is during in the first application scenario, whethermobile terminal 100 puts out screen standby depends on default very first time interval, very first time interval can be automatic stand-by time T, state switch unit 140 is switched to use state (switching herein also can be understood as and allowsmobile terminal 100 maintain use state) bymobile terminal 100, and further judgemobile terminal 100 stops using the time of (if mobile terminal does not receive operational order or do not exist the application program operation of non-running background to judge thatmobile terminal 100 stops using) whether to be more than or equal to very first time interval, ifmobile terminal 100 is switched to and puts out screen holding state, maintain if not the current state of mobile terminal 100.Whenmobile terminal 100 is during in the second application scenario, state switch unit 140 is switched to mobile terminal and puts out screen holding state immediately, andmobile terminal 100 puts out screen standby screen locking (if user is provided with screen locking function) immediately.Whenmobile terminal 100 is during in the 3rd application scenario, state switch unit 140 first judges thatmobile terminal 100 is current whether in use state, if maintain the current state of mobile terminal, represent that if notmobile terminal 100 is current for idle,mobile terminal 100 is switched to and puts out screen holding state,mobile terminal 100 puts out screen standby screen locking (if user is provided with screen locking function) immediately. whenmobile terminal 100 is during in the 4th application scenario, state switch unit 140 is switched tomobile terminal 100 to put out screen holding state,mobile terminal 100 puts out screen standby screen locking (if user is provided with screen locking function) immediately.
In mobile terminal 100 second embodiment of the present invention, shown in Figure 1, in this enforcement, mobile terminal 100 comprises preposition light sensor 111 and range sensor 112, rearmounted light sensor 121 and range sensor 122, application scenario determining unit 130 and state switch unit 140, and application scenario determining unit 130 is connected with range sensor 120 and state switch unit 140 with preposition light and range sensor 110, rearmounted light respectively.Wherein, preposition light sensor 111 and range sensor 112 are arranged at the front of mobile terminal 100, i.e. screen one side, as shown in Figure 2, can be arranged at the top of screen, preposition light sensor 111 is for detecting in real time the intensity I of the ambient light in mobile terminal 100 fronts1, and by the I detecting1with default first threshold comparison, and at I1while being less than or equal to first threshold, produce and send interrupt signal, preposition range sensor 112 is for detecting in real time the distance L in shelter and mobile terminal 100 fronts1, and by the L detecting1compare with default Second Threshold, if L1while being less than or equal to Second Threshold, preposition range sensor 112 produces and sends interrupt signal.Mobile terminal 100 be take mobile phone as example, if user makes a phone call by mobile phone, user's face is close to the front of mobile phone, and preposition light sensor 111 detects the intensity I of the ambient light in mobile phone front1be less than or equal to first threshold, preposition range sensor 111 detects the distance L in shelter (user's face) and mobile phone front1be less than or equal to Second Threshold, all produce and send interrupt signal.
The back side that rearmounted light sensor 121 and range sensor 122 are arranged atmobile terminal 100, be the back side ofmobile terminal 100 screens, the top that rearmounted light sensor 121 and range sensor 122 can be arranged onmobile terminal 100 or below are to avoid the middle part ofmobile terminal 100, avoid user to hold the impact ofmobile terminal 100, as shown in Figure 3, rearmounted light sensor 121 and range sensor 122 can be arranged to the side ofmobile terminal 100 back side cameras.Rearmounted light sensor 121 is for detecting in real time the intensity I of the ambient light atmobile terminal 100 back sides2, and by the I detecting2with the 3rd default threshold value comparison, if I2be less than or equal to the 3rd threshold value, produce and send interrupt signal.Rearmounted range sensor 122 is for detecting in real time the distance L at shelter and the mobile terminal back side2, and by the L detecting2with the 4th default threshold value comparison, and at L2while being less than or equal to the 4th threshold value, produce and send interrupt signal.
Application scenario determining unit 130, determines the residing application scenario of mobile terminal for the testing result based on I1 and L1, I2 and L2.The interrupt signal variable that preposition light sensor 111 and range sensor 112 generations are set is INT_FRONT, and the interrupt signal variable that rearmounted light sensor 121 and range sensor 122 generations are set is INT_BACK.Work as L1while being less than or equal to Second Threshold, will inevitably cause I1from being greater than light intensity threshold value, dropping to and be less than or equal to first threshold, and I1from being greater than first threshold, dropping to while being less than or equal to first threshold and not necessarily have shelter to be positioned at mobile terminal 100 fronts, for example, mobile terminal 100 is in a darkroom.Therefore, the interrupt signal that application scenario determining unit 130 produces preposition light sensor 111 and range sensor 112 separately carries out, after logical AND processing, obtaining the value of variable INT_FRONT, in like manner obtains the value of variable INT_BACK.For example, preposition light sensor 111 and range sensor 112 all do not produce interrupt signal, and the value of variable INT_FRONT is 0; If preposition light sensor 111 produces interrupt signal, range sensor 112 does not produce interrupt signal, and the value of variable INT_FRONT is 0; When preposition range sensor 112 produces interrupt signal, preposition light sensor 111 must produce interrupt signal, and the value of variable INT_FRONT is 1.In like manner, rearmounted light sensor 121 and range sensor 122 all do not produce interrupt signal, and the value of variable INT_BACK is 0; If rearmounted light sensor 121 produces interrupt signal, range sensor 122 does not produce interrupt signal, and the value of variable INT_BACK is 0; When rearmounted range sensor 122 produces interrupt signal, rearmounted light sensor 121 must produce interrupt signal, and the value of variable INT_BACK is 1.
In other embodiment ofmobile terminal 100 of the present invention abovemobile terminal 100 back sides and below light sensor 121 and/or the range sensor 122 of difference postposition, by being arranged at rearmounted light sensor 121 and/or the range sensor 122 of lower rear, identify better the situation of holding mobile phone.Application scenario determining unit 130 can be by the light sensor 121(range sensor 122 of a plurality of postposition) interrupt signal that produces carries out logic OR processing and participates in follow-up judgement and processing again.
The logic state of INT_FRONT and INT_BACK and the corresponding relation of application scenario are as shown in table 1.Visible, in the present embodiment, work as L1be greater than first threshold, and L2while being greater than the 4th threshold value, application scenario determining unit 130 determines thatmobile terminal 100 is in the first application scenario; Work as I1and L1all be less than or equal to each self-corresponding threshold value, and L2while being greater than the 4th threshold value, application scenario determining unit 130 determines thatmobile terminal 100 is in the second application scenario; Work as L1be greater than Second Threshold, and I2and L2while being all less than or equal to each self-corresponding threshold value, application scenario determining unit 130 determines thatmobile terminal 100 is in the 3rd application scenario; Work as I1and L1all be less than or equal to each self-corresponding threshold value, and I2and L2while being all less than or equal to each self-corresponding threshold value, application scenario determining unit 130 determines thatmobile terminal 100 is in the 4th application scenario.
Under the first application scenario,mobile terminal 100 is in use state, under use state, mobile terminal 100 (for example receives operation that user carries out, user's point touching screen, function button is triggered), and/or have the application program (for example, game, video jukebox software, document ocr software etc.) of non-running background to move.
Under the second application scenario, the front ofmobile terminal 100 thing that is blocked blocks, and in idle or talking state, for examplemobile terminal 100 face down are positioned over desktop, and whenmobile terminal 100 is mobile phone, user makes a phone call by mobile phone, the mobile phone face of being close to the users.
Under the 3rd application scenario, the back side ofmobile terminal 100 thing that is blocked blocks, in idle or use state, for examplemobile terminal 100 faces up and leaves unused in desktop, ormobile terminal 100 faces up and is positioned over the application program (use state) that desktop and user are just just moving non-running background on operatingmobile terminal 100 ormobile terminal 100.
Under the 4th application scenario,mobile terminal 100 front and backs are all blocked by obstructions, and for example,mobile terminal 100 is placed on Bao Baoli.
State switch unit 140, based on the residing application scenario of the determined mobile terminal 100 of application scenario determining unit 130, makes mobile terminal 100 be switched to use state or puts out screen holding state.Particularly, when mobile terminal 100 is during in the first application scenario, whether mobile terminal 100 puts out screen standby depends on default very first time interval, very first time interval can be automatic stand-by time T, state switch unit 140 is switched to use state (switching herein also can be understood as and allows mobile terminal 100 maintain use state) by mobile terminal 100, and further judge mobile terminal 100 stops using the time of (if mobile terminal does not receive operational order or do not exist the application program operation of non-running background to judge that mobile terminal 100 stops using) whether to be more than or equal to very first time interval, if mobile terminal 100 is switched to and puts out screen holding state, maintain if not the current state of mobile terminal 100.When mobile terminal 100 is during in the second application scenario, state switch unit 140 is switched to mobile terminal and puts out screen holding state immediately, and mobile terminal 100 puts out screen standby screen locking (if user is provided with screen locking function) immediately.When mobile terminal 100 is during in the 3rd application scenario, state switch unit 140 first judges that mobile terminal 100 is current whether in use state, if maintain the current state of mobile terminal, represent that if not mobile terminal 100 is current for idle, mobile terminal 100 is switched to and puts out screen holding state, mobile terminal 100 puts out screen standby screen locking (if user is provided with screen locking function) immediately. whenmobile terminal 100 is during in the 4th application scenario, state switch unit 140 is switched tomobile terminal 100 to put out screen holding state,mobile terminal 100 puts out screen standby screen locking (if user is provided with screen locking function) immediately.
Fig. 4 is the workflow diagram of mobile terminal 100 second embodiment of the present invention, as shown in Figure 4, whether application scenario determining unit 130 judgment variable INT_FRONT and INT_BACK are equal to 0, if determine that mobile terminal 100 is in the first application scenario, then ((switching herein also can be understood as and allows mobile terminal 100 maintain use state) is to use state by mobile terminal 100 switchings for state switch unit 140, and further judge whether the 100 withdraw from service times of mobile terminal are more than or equal to very first time interval, if mobile terminal 100 is switched to and puts out screen holding state, maintain if not the current state of mobile terminal 100, continue the logic state judgement circulation of entering variable INT_FRONT and INT_BACK.If application scenario determining unit 130 judgment variable INT_FRONT and INT_BACK are not 0 simultaneously, whether judgment variable INT_FRONT is 1, and whether variable INT_BACK is O, if set up and judge that now mobile terminal 100 is in the second application scenario, then state switch unit 140 is switched to mobile terminal 100 to put out screen holding state immediately, make mobile terminal 100 put out immediately screen standby screen locking (if user is provided with screen locking function), afterwards by the logic state judgement circulation of entering variable INT_FRONT and INT_BACK, if be false, whether application scenario determining unit 130 judgment variable INT_FRONT are 0, and whether variable INT_BACK is 1.If variable INT_FRONT be 0 and variable INT_BACK be 1 establishment, state switch unit 140 judges that now mobile terminal 100 is in the 3rd application scenario, then state switch unit 140 judges that whether current mobile terminal 100 is in use state, if maintain the current state of mobile terminal, and the logic state of entering variable INT_FRONT and INT_BACK judgement circulation, if current mobile terminal 100 is not in use state, state switch unit 140 is switched to mobile terminal 100 to put out screen holding state, make mobile terminal 100 put out immediately screen standby screen locking, the circulation of the logic state of entering variable INT_FRONT and INT_BACK judgement afterwards.If variable INT_FRONT be 0 and variable INT_BACK 1 be false, whether application scenario determining unit 130 judgment variable INT_FRONT and INT_BACK are 1, if judge that current mobile terminal 100 is in the 4th application scenario, then state switch unit 140 is switched to mobile terminal 100 to put out screen holding state, make mobile terminal 100 put out immediately screen standby screen locking, the circulation of the logic state of entering variable INT_FRONT and INT_BACK judgement afterwards.
In other embodiment ofmobile terminal 100 of the present invention, can also adopt on mobile terminal 100 fronts preposition light sensor 111 is set, rearmounted range sensor 122 is set overleaf, or on mobile terminal 100 fronts, preposition range sensor 112 is set, rearmounted light sensor 121 is set overleaf and determines the residing application scenario ofmobile terminal 100.
In the second embodiment of mobile terminal 100 of the present invention, by preposition light sensor 111 and range sensor 112 and rearmounted light sensor 121 and range sensor 122 are set, respectively the light intensity of the front and back of mobile terminal 100 and circumstance of occlusion are detected, based on testing result, determine the residing application scenario of mobile terminal 100, application scenario based on definite is switched to mobile terminal 100 use state or puts out screen holding state, can when not used, mobile terminal 100 not make mobile terminal 100 put out immediately screen standby, without waiting for the automatic stand-by time, at utmost save the power consumption of mobile terminal 100, in addition, when user picks up when putting out the mobile terminal 100 of screen holding state, mobile terminal 100 can enter use state immediately, without user, carry out button operation, improved the intellectuality of mobile terminal 100.For example, user is using mobile terminal to see a film, and will go to go to toilet midway, user makes film playout software stop movie, conveniently mobile terminal is placed on desk to the moment of placement, by the detection of rearmounted light and range sensor, mobile terminal is by automatic stand-by screen locking.After user returns, pick up mobile terminal, pick up moment mobile terminal bright screen release, user can continue to watch film.Watch in process, user's feel, to aching, is placed into (note does not now suspend play operation) on desktop by mobile terminal and continues to watch, now because user is also using, and the screen standby so mobile terminal does not go out.Film finishes, user will go out, mobile terminal is carried in pocket, put into the moment in pocket, mobile terminal puts out screen standby, before facing and going out, user takes out again mobile terminal and wants to check current time, take out the moment of mobile terminal, mobile terminal enters use state, and user can see the time on energy screen at once.
Fig. 5 is the flow chart of control method first embodiment of mobile terminal of the present invention, and as shown in Figure 5, in the present embodiment, the control method of mobile terminal comprises the following steps:
S1, detect in real time the intensity I of the ambient light in mobile terminal front1and/or the distance L in shelter and mobile terminal front1, detect in real time the intensity I of the ambient light at the mobile terminal back side2and/or the distance L at shelter and the mobile terminal back side2;
S2, based on I1and/or L1, I2and/or L2testing result determine the residing application scenario of mobile terminal;
S3, based on the residing application scenario of mobile terminal, make mobile terminal be switched to use state or put out screen holding state.
Referring to Fig. 1, in the step S1 of the present embodiment, by being arranged on the preposition light sensor 110 inmobile terminal 100 fronts, detect in real time the intensity I of the ambient light inmobile terminal 100 fronts1, and/or detect in real time the distance L in shelter and mobile terminal 100 fronts by being arranged on the future range transducer 112 inmobile terminal 100 fronts1, by being arranged on the rearmounted light sensor 121 atmobile terminal 100 back sides, detect in real time the intensity I of the ambient light at the mobile terminal back side2, and/or detect in real time the distance L at shelter and the mobile terminal back side by being arranged at the rearmounted range sensor 122 atmobile terminal 100 back sides2.
The step S2 of the present embodiment comprises following sub-step: S20: preset for respectively with I1and/or L1, I2and/or L2first and/or the Second Threshold comparing, the 3rd and/or the 4th threshold value; S21, respectively by I1and/or L1, I2and/or L2compare with corresponding threshold value separately; S22, based on I1and/or L1, I2and/or L2determine the residing application scenario of mobile terminal with the comparative result of corresponding threshold value separately.
Below with based on I1, L1, I2and L2determine that with the comparative result of corresponding threshold value separately the residing application scenario of mobile terminal is example, particularly, in sub-step S21, preposition light sensor 111 is by the I detecting1with default first threshold comparison, preposition range sensor 112 is by the L detecting1compare with default Second Threshold, if I1be less than or equal to first threshold, preposition light sensor 111 produces and sends interrupt signal, if L1while being less than or equal to Second Threshold, preposition range sensor 112 produces and sends interrupt signal.Rearmounted light sensor 121 is by the I detecting2with the 3rd default threshold value comparison, and at I2while being less than or equal to the 3rd threshold value, producing and send interrupt signal, rearmounted range sensor 122 is by the L detecting2with the 4th default threshold value comparison, and at L2while being less than or equal to the 3rd threshold value, producing and send interrupt signal.
In sub-step S22, the interrupt signal variable that application scenario determining unit 130 arranges preposition light sensor 111 and range sensor 112 generations is INT_FRONT, the interrupt signal variable that rearmounted light sensor 121 and range sensor 122 generations are set is INT_BACK, the interrupt signal that application scenario determining unit 130 produces preposition light sensor 111 and range sensor 112 separately carries out obtaining after logical AND processing the value of variable INT_FRONT, in like manner obtain the value of variable INT_BACK, and the logic state based on INT_FRONT and INT_BACK is determined the residing application scenario of mobile terminal 100, both corresponding relations are referring to table 1.Visible, work as L1be greater than first threshold, and L2while being greater than Second Threshold, mobile terminal is in the first application scenario; Work as I1and L1all be less than or equal to corresponding threshold value separately, and L2while being greater than the 3rd threshold value, mobile terminal is in the second application scenario; Work as L1be greater than Second Threshold, and I2and L2while being all less than or equal to corresponding threshold value separately, mobile terminal is in the 3rd application scenario; Work as I1and L1all be less than or equal to corresponding threshold value separately, and I2and L2while being all less than or equal to corresponding threshold value separately, mobile terminal is in the 4th application scenario.
The step S3 of the present embodiment comprises following sub-step: S31, ifmobile terminal 100 is in the first application scenario, state switch unit 140 is switched to use state bymobile terminal 100, and further judgemobile terminal 100 stops using the time of (if the application program thatmobile terminal 100 does not receive operational order or do not have a non-running background in very first time interval judges that in operationmobile terminal 100 stops using) whether to be more than or equal to very first time interval, ifmobile terminal 100 is switched to and puts out screen holding state, maintain if not the current state ofmobile terminal 100, if S32mobile terminal 100 is in the second application scenario, state switch unit 140 is switched tomobile terminal 100 to put out screen holding state, if S33mobile terminal 100 is in the 3rd application scenario, 140 of state switch units further judge thatmobile terminal 100 is current whether in use state, if maintain the current state ofmobile terminal 100,mobile terminal 100 is switched to and puts out screen holding state if not, if S34mobile terminal 100 is in the 4th application scenario, 140 of state switch units are switched tomobile terminal 100 to put out screen holding state.
In control method first embodiment of mobile terminal of the present invention, by preposition light range sensor 111 and/or range sensor 112 are set, rearmounted light range sensor 121 and range sensor 122, respectively the light intensity of the front and back ofmobile terminal 100 and/or circumstance of occlusion are detected, based on testing result, determine the residing application scenario ofmobile terminal 100, application scenario based on definite is switched tomobile terminal 100 use state or puts out screen holding state, can when not used,mobile terminal 100 not makemobile terminal 100 put out immediately screen standby, without waiting for the automatic stand-by time, at utmost save the power consumption ofmobile terminal 100, in addition, when user picks up when putting out themobile terminal 100 of screen holding state,mobile terminal 100 can enter use state immediately, without user, carry out button operation, improved the intellectuality ofmobile terminal 100.
The foregoing is only the preferred embodiments of the present invention, be not limited to the present invention, for a person skilled in the art, the present invention can have various modifications and variations.Within the spirit and principles in the present invention all, any modification of doing, be equal to replacement, improvement etc., within all should being included in claim scope of the present invention.