[summary of the invention]
Technical problem to be solved by this invention is to provide a kind of mobile terminal and pending information cuing method thereof and device, with when receiving pending information, can according to the prompting mode of the distance controlling mobile terminal of mobile terminal and user, save the power consumption of mobile terminal, promote the experience sense of user.
The present invention is that the technical scheme that technical solution problem adopts is to provide the pending information cuing method of a kind of mobile terminal, said method comprising the steps of:
When mobile terminal receives pending information, obtain the distance of mobile terminal and user; Wherein, mobile terminal arranges a global variable: bool g_current_user_be_far_way; Described global variable in order to preserve the distance state of current described mobile terminal and user, and upgrades after the distance state of mobile terminal and user changes; If the distance state of described mobile terminal and user is constant, does not then need to change the prompting mode to user, if the distance state of described mobile terminal and user changes, then adjust the prompting mode to user accordingly;
The distance threshold that distance and the mobile terminal system of mobile terminal and user are arranged is compared, obtains comparative result and then determine described distance state; Described distance state comprise away from, close to and invalid value in one; Described state when being more than or equal to described distance threshold away from the distance for described mobile terminal and user; The described distance being close to described mobile terminal and user is less than the state of described distance threshold; Described invalid value be described mobile terminal judge have more than one user continuous away from or close to time state;
Control mobile terminal to the prompting mode of user according to comparative result, the prompting mode of described mobile terminal to user comprises prompt tone, light display or vibrations;
If the distance state of described mobile terminal and user be close to time, described mobile terminal opens screen and keyboard back light, and the mode shown by light points out user to have calling, simultaneously close prompt tone prompting;
If the distance state of described mobile terminal and user be away from time, described mobile terminal is opened prompt tone and is pointed out, simultaneously close light display, namely do not pointed out by screen and keyboard back light;
If the distance state of described mobile terminal and user is from close away from becoming, described mobile terminal closes prompt tone prompting, opens light display, is namely pointed out by screen and keyboard back light.
According to one preferred embodiment of the present invention, pending information comprises calling, short message or Email.
According to one preferred embodiment of the present invention, mobile terminal obtains the distance of mobile terminal and user by infrared ray, bluetooth or hyperacoustic mode.
According to one preferred embodiment of the present invention, mobile terminal periodically obtains the distance of mobile terminal and user according to the time value that mobile terminal system is arranged.
The present invention is that the technical scheme that technical solution problem adopts is to provide the pending information presentation device of a kind of mobile terminal, and described device comprises:
Distance acquisition module, for when mobile terminal receives pending information, obtains the distance of mobile terminal and user; Wherein, mobile terminal arranges a global variable: boolg_current_user_be_far_way; Described global variable in order to preserve the distance state of current described mobile terminal and user, and upgrades after the distance state of mobile terminal and user changes; If the distance state of described mobile terminal and user is constant, does not then need to change the prompting mode to user, if the distance state of described mobile terminal and user changes, then adjust the prompting mode to user accordingly;
Distance comparison module, compares for the distance threshold arranged distance and the described mobile terminal system of mobile terminal and user, obtains comparative result and then determines described distance state; Described distance state comprise away from, close to and invalid value in one; Described state when being more than or equal to described distance threshold away from the distance for described mobile terminal and user; The described distance being close to described mobile terminal and user is less than the state of described distance threshold; Described invalid value be described mobile terminal judge have more than one user continuous away from or close to time state;
Prompting mode control module, the comparative result for obtaining according to distance comparison module controls mobile terminal to the prompting mode of user, and the prompting mode of described mobile terminal to user comprises prompt tone, light display or vibrations;
If the distance state of described mobile terminal and user be close to time, described mobile terminal opens screen and keyboard back light, and the mode shown by light points out user to have calling, simultaneously close prompt tone prompting;
If the distance state of described mobile terminal and user be away from time, described mobile terminal is opened prompt tone and is pointed out, simultaneously close light display, namely do not pointed out by screen and keyboard back light;
If the distance state of described mobile terminal and user is from close away from becoming, described mobile terminal closes prompt tone prompting, opens light display, is namely pointed out by screen and keyboard back light.
According to one preferred embodiment of the present invention, pending information comprises calling, short message or Email.
According to one preferred embodiment of the present invention, distance acquisition module obtains the distance of mobile terminal and user by infrared ray, bluetooth or hyperacoustic mode.
According to one preferred embodiment of the present invention, distance acquisition module periodically obtains the distance of mobile terminal and user according to the time value that mobile terminal system is arranged.
The present invention is that the technical scheme that technical solution problem adopts is to provide a kind of mobile terminal, comprises induction chip, also comprises the pending information presentation device of mobile terminal that the embodiment of the present invention provides:
Induction chip is for responding to the distance of described mobile terminal and user; Wherein, mobile terminal arranges a global variable: bool g_current_user_be_far_way; Described global variable in order to preserve the distance state of current described mobile terminal and user, and upgrades after the distance state of mobile terminal and user changes; If the distance state of described mobile terminal and user is constant, does not then need to change the prompting mode to user, if the distance state of described mobile terminal and user changes, then adjust the prompting mode to user accordingly;
The distance of the mobile terminal that mobile terminal pending information presentation device acquisition induction chip senses and user, and the distance threshold that the distance of mobile terminal and user and mobile terminal system are arranged is compared, obtain a comparative result and then determine described distance state; Described distance state comprise away from, close to and invalid value in one; Described state when being more than or equal to described distance threshold away from the distance for described mobile terminal and user; The described distance being close to described mobile terminal and user is less than the state of described distance threshold; Described invalid value be described mobile terminal judge have more than one user continuous away from or close to time state; Control mobile terminal to the prompting mode of user according to comparative result, the prompting mode of described mobile terminal to user comprises prompt tone, light display or vibrations;
If the distance state of described mobile terminal and user be close to time, described mobile terminal opens screen and keyboard back light, and the mode shown by light points out user to have calling, simultaneously close prompt tone prompting;
If the distance state of described mobile terminal and user be away from time, described mobile terminal is opened prompt tone and is pointed out, simultaneously close light display, namely do not pointed out by screen and keyboard back light;
If the distance state of described mobile terminal and user is from close away from becoming, described mobile terminal closes prompt tone prompting, opens light display, is namely pointed out by screen and keyboard back light.
By above embodiment, the present invention, when receiving pending information, according to the prompting mode of the distance controlling mobile terminal of mobile terminal and user, can save the power consumption of mobile terminal greatly, well improve the experience sense of user, be beneficial to the popularization of mobile terminal.
[embodiment]
Below in conjunction with drawings and Examples, the present invention is described in detail.
Fig. 1 shows the flow process of the pending information cuing method of mobile terminal that the embodiment of the present invention provides.
In step S101, when mobile terminal receives pending information, obtain the distance of mobile terminal and user.
Preferably, pending information comprises calling, short message or Email, can certainly comprise other pending information, if such as mobile terminal QQ software is installed, the information that user is received when chat by QQ is also pending information.
In specific implementation process, mobile terminal inside arranges induction chip, and this induction chip obtains the distance of mobile terminal and user by infrared ray, bluetooth or hyperacoustic mode.Induction chip by launch infrared ray, bluetooth or or ultrasonic wave, then calculated the distance of mobile terminal and user by infrared ray, bluetooth or ultrasonoscope that head or other positions of reception user human body reflect.Can certainly be that other modes obtain, as long as the distance of mobile terminal and user can be obtained, not enumerate herein.
In step s 102, the distance threshold that distance and the mobile terminal system of mobile terminal and user are arranged is compared, obtains comparative result.
In specific implementation process, distance threshold, can also be grand for what be defined in mobile terminal code except being arranged by mobile terminal system, and distance threshold, after arranging, is kept in the file of mobile terminal.
Wherein, this distance value, after the distance being got mobile terminal and user by induction chip, is converted into the unit consistent with distance threshold to compare by mobile terminal, such as centimetre cm.
Concrete, comparative result comprises following several distance state:
A, away from: the distance of mobile terminal and user is more than or equal to distance threshold, such as distance threshold is 50cm, and the distance of mobile terminal and user is 70cm, now, the distance state of mobile terminal and user be away from;
B, close: the distance of mobile terminal and user is less than distance threshold, such as distance threshold is 50cm, and the distance of mobile terminal and user is 30cm, and now, the distance state of mobile terminal and user is close;
C, invalid value: mobile terminal judge to have within the specific limits multiple user constantly away from or close, or other complicated situations, are now judged to be invalid value.
Preferably, the distance that mobile terminal periodically obtains mobile terminal and user according to the time value of Operation system setting upgrades, the time value that for example mobile terminal timer internal is arranged is 2 seconds, then mobile terminal just obtained the distance of mobile terminal and user every 2 seconds.
Wherein, mobile terminal arranges a global variable:
bool g_current_user_be_far_way;
This global variable in order to preserve the distance state of current mobile terminal and user, and upgrades after the distance state of mobile terminal and user changes.If the distance state of mobile terminal and user is constant, does not then need to change the prompting mode to user, if the distance state of mobile terminal and user changes, then adjust the prompting mode to user accordingly.
The embodiment of the present invention is by periodically obtaining the distance of mobile terminal and user, the prompting mode of mobile terminal directly can be controlled according to the distance of user and mobile terminal, if for example user rises and does not sell to receive calls, then directly can walk close to mobile terminal, after mobile terminal judges that user walks close to, automatically prompting mode will be regulated, greatly convenient for users to use.
In step s 103, mobile terminal is controlled to the prompting mode of user according to comparative result.
Preferably, the prompting mode of mobile terminal to user comprises prompt tone, light display or vibrations, can certainly be other prompting mode, not enumerate herein.
In specific implementation process, mobile terminal provides a prompting mode translation interface function:
int call_module_user_distance_change(change_type type);
This prompting mode translation interface function distance state change after, notice mobile terminal switch prompting mode, distance state parametric t ype is wherein an enumeration type, mainly contains three kinds of values: away from, close and invalid value; When mobile terminal and user distance state from " away from " become " close " after, call this function, and import into user " away from " parameter;
Mobile terminal, according to the distance state parameter of prompting mode translation interface function, controls prompting mode by following several function interface:
1), keyboard light control interface parameter:
Int keypad_back_light_control(light_status on);
Function: the switch of supervisory keyboard lamp; Parameter: enumeration type comprises Kai Heguan;
2), screen backlight control interface parameter:
Int lcd_back_light_control(light_status on);
Function: the switch controlling screen backlight; Parameter: enumeration type comprises open and close and flicker;
3), prompt tone interface function:
Int notify_ring_control(ring_status off);
Function: the broadcasting or the stopping that controlling incoming call prompting sound; Parameter: enumeration type comprises to be play and stop.
Wherein, when the distance state parameter that prompting mode translation interface function imports into is for " close ", mobile terminal calls keyboard light control interface parameter and opens keyboard, and call screen backlight control interface parameter and open screen back light modulation, also call prompt tone interface function and close incoming call prompting sound, and upgrade current customer location state, be set to " close " state by this global variable g_current_user_be_far_way;
When the customer location state parameter imported into for " away from " time, mobile terminal calls keyboard light control interface parameter closing keyboard, and call screen backlight control interface parameter closedown screen back light modulation, also call prompt tone interface function playing alert tones, and upgrade current customer location state, by this global variable g_current_user_be_far_way be set to " away from " state.
Receive calling for mobile phone below and describe the embodiment of the present invention:
When mobile phone receives calling, first obtain the distance of mobile phone and user, and mobile phone and the distance of user and the distance threshold of Operation system setting are judged, the distance state of acquisition mobile phone and user;
If when the distance state of mobile phone and user is " close ", mobile phone open screen and keyboard back light, the mode shown by light points out user to have calling, closes prompt tone prompting simultaneously;
If the distance state of mobile phone and user be " away from " time, mobile phone open prompt tone is pointed out, simultaneously close light display, namely do not pointed out by screen and keyboard back light;
If the distance state of mobile phone and user from " away from " become " close ", then close prompt tone prompting, open light display, namely pointed out by screen and keyboard back light;
After user answers or hangs up this calling, closeall prompting mode.
Obviously, the embodiment of the present invention can save the power consumption of mobile phone greatly, and hommization very, can promote the experience sense of user.
Fig. 2 shows the structure of the pending information presentation device of mobile terminal that the embodiment of the present invention provides, and comprises distance acquisition module 21, distance comparison module 22 and prompting mode control module 23.
Wherein, when mobile terminal receives pending information, distance acquisition module 21 obtains the distance of described mobile terminal and user;
Preferably, pending information comprises calling, short message or Email, can certainly comprise other pending information, not enumerate herein.
Preferably, distance acquisition module 21 obtains the distance of mobile terminal and user by infrared ray, bluetooth or hyperacoustic mode, can certainly be other modes, not enumerate herein.
In specific implementation process, distance acquisition module 21 periodically obtains the distance of mobile terminal and user according to the time value that mobile terminal system is arranged, the time value that for example mobile terminal timer internal is arranged is 2 seconds, then mobile terminal just obtained the distance of mobile terminal and user every 2 seconds.
The distance threshold that the distance of distance comparison module 22 pairs of mobile terminals and user and mobile terminal system are arranged compares, and obtains a comparative result;
In specific implementation process, distance threshold is except being arranged by mobile terminal system, and can also be that it is grand to be defined in mobile terminal code, distance threshold, after arranging, be kept in the file of mobile terminal.
The comparative result that prompting mode control module 23 obtains according to distance comparison module 22 controls the prompting mode of described mobile terminal to user.
Preferably, the prompting mode of mobile terminal to user comprises prompt tone, light display or vibrations, can certainly be other prompting mode, not enumerate herein.
Principle about the pending information presentation device of mobile terminal refers to above for the description of the pending information cuing method of mobile terminal, repeats no more herein.
Refer to Fig. 3, Fig. 3 shows the structure of the mobile terminal that the embodiment of the present invention provides, and comprises induction chip 31, also comprises the pending information presentation device 32 of mobile terminal that the embodiment of the present invention provides.
Wherein, induction chip 31 is for responding to the distance of mobile terminal and user;
The pending information presentation device 32 of mobile terminal obtains the distance of mobile terminal that induction chip 31 senses and user, and the distance threshold that the distance of mobile terminal and user and mobile terminal system are arranged is compared, obtain a comparative result, control the prompting mode of described mobile terminal to user according to comparative result.Refer to description above about the detailed construction of the pending information presentation device of mobile terminal and operation principle, repeat no more herein.
The present invention, when receiving pending information, according to the prompting mode of the distance controlling mobile terminal of mobile terminal and user, can save the power consumption of mobile terminal, well improves the experience sense of user, be beneficial to the popularization of mobile terminal greatly.
In the above-described embodiments, only to invention has been exemplary description, but those skilled in the art can carry out various amendment to the present invention without departing from the spirit and scope of the present invention after reading present patent application.