1. A method of providing a notification of a received message in an electronic device, the method comprising the steps of: detecting motion of the electronic device; determining a mode of the electronic device upon detecting a motion of the electronic device; and executing an alert if it is determined that said mode determined in the step of determining is a sleep mode.