Phone uses GPS to detect locations where you may not want to receive calls and texts.
Microsoft has begun work on a phone that can prevent its customers from being disturbed by calls, text messages and social media at inappropriate times.
Despite phones becoming an important part of everyday life, there are some instances when people do not want to be disturbed, such as during an important meeting, at the cinema or going to bed.
The phone will divert calls in such situations by using a range of sensors to detect its surrounding environment, automatically diverting calls and telling your friends you are unavailable in the right conditions.
For example, by detecting that a room is dark while placed face up on a table, its light sensors will recognise that the user is probably asleep or trying to get to sleep. If its GPS detects that the phone a specific location like a cinema or the theatre, it will also divert calls to voicemail and prevent messages from getting through.
The phone would determine if its user was driving by detecting the speed it was moving at. The phone may ask your friends to phone you on hands free rather than sending text or instant messages. Simply turning the phone face down on a table may indicate that the user is in a meeting and so they are unavailable.
A recently published patent application made by Microsoft stated: "Currently online availability is determined via the use, or lack of use, of a computer or via a user manually setting their online availability.
"One drawback associated with determining online availability using current network based messaging applications is that a user is required to keep one’s availability state up to date.
"Sets of rules may describe different online presence states associated with a user of the mobile device. A rule may instruct the messaging application to automatically restrict communication to a certain mode of communication based on received sensor location data.
"For example, if it determined that the user of the mobile computing device is moving, for example, the user is driving, then the messaging applications may change the users preferred communication method.
"If the mobile computing device is upside down, then a matching online presence state is ‘Do not disturb’. But if the mobile computing device is right side up and the lights are turned off, then a matching online presence state is ‘Unavailable’."
The patent added: "The communication preferences may include without limitation, IM text messages, electronic mail, voice calls, video conferencing voice mail and a restriction preference."